Skip to content

Commit 6a8e27c

Browse files
authored
Merge pull request lydiahallie#675 from rajanmagar/question-no-37
Fix Question No. 37
2 parents 8ea06a4 + 14ac4a5 commit 6a8e27c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1142,9 +1142,9 @@ numbers[10] = 11;
11421142
console.log(numbers);
11431143
```
11441144

1145-
- A: `[1, 2, 3, 7 x null, 11]`
1145+
- A: `[1, 2, 3, null x 7, 11]`
11461146
- B: `[1, 2, 3, 11]`
1147-
- C: `[1, 2, 3, 7 x empty, 11]`
1147+
- C: `[1, 2, 3, empty x 7, 11]`
11481148
- D: `SyntaxError`
11491149

11501150
<details><summary><b>Answer</b></summary>
@@ -1154,7 +1154,7 @@ console.log(numbers);
11541154

11551155
When you set a value to an element in an array that exceeds the length of the array, JavaScript creates something called "empty slots". These actually have the value of `undefined`, but you will see something like:
11561156

1157-
`[1, 2, 3, 7 x empty, 11]`
1157+
`[1, 2, 3, empty x 7, 11]`
11581158

11591159
depending on where you run it (it's different for every browser, node, etc.)
11601160

0 commit comments

Comments
 (0)