Skip to content

Commit 5e06d28

Browse files
IamManchandamarijnh
authored andcommitted
Example is confusing so change it a bit
1 parent 8c0d023 commit 5e06d28

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

04_data.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ is called an _array_ and is written as a list of values between
9797
[source,javascript]
9898
----
9999
var listOfNumbers = [2, 3, 5, 7, 11];
100-
console.log(listOfNumbers[1]);
100+
console.log(listOfNumbers[2]);
101+
// → 5
102+
console.log(listOfNumbers[2 - 1]);
101103
// → 3
102-
console.log(listOfNumbers[1 - 1]);
103-
// → 2
104104
----
105105

106106
((([] (subscript))))(((array,indexing)))The notation for getting

0 commit comments

Comments
 (0)