Skip to content

Commit b5b12a7

Browse files
committed
2 parents 7e2a57a + ea8ffac commit b5b12a7

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.deepsource.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version = 1
2+
3+
[[analyzers]]
4+
name = "javascript"
5+
6+
[analyzers.meta]
7+
environment = [
8+
"nodejs",
9+
"browser"
10+
]

Tutorials/Basic/07_objects/07_hasOwnProperty.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ var Room = {
99
height: 15,
1010
}
1111

12-
console.log(Room.hasOwnProperty("length")) // Output: false
12+
console.log(Object.prototype.hasOwnProperty.call(Room, 'length')) // Output: false
1313

1414
Room.length = 20 // Alternatively, Room['length'] = 20 also works fine
1515

16-
console.log(Room.hasOwnProperty("length")) // Output: true
16+
console.log(Object.prototype.hasOwnProperty.call(Room, 'length')) // Output: true

Tutorials/Basic/challenge.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function countVowelsAndConsonants(str) {
1818
let digit_count = 0;
1919
let digit_sum = 0
2020

21-
for(var i = 0; i <= str.length; i++) {
21+
for(var i = 0; i < str.length; i++) {
2222
if(vowels.includes(str[i])) {
2323
vowel_count++
2424
}

0 commit comments

Comments
 (0)