From 405675261d2cd5e48834ec461dde403d57f1af5a Mon Sep 17 00:00:00 2001 From: Suph <74834854+sprajams@users.noreply.github.com> Date: Wed, 30 Mar 2022 11:45:20 -0700 Subject: [PATCH] fix(curriculum): clear up confusion of array index (#45576) --- .../basic-javascript/access-array-data-with-indexes.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md index 00d7f1f61a..d2b02a21b6 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.md @@ -19,11 +19,11 @@ Array indexes are written in the same bracket notation that strings use, except ```js const array = [50, 60, 70]; -array[0]; +console.log(array[0]); const data = array[1]; ``` -`array[0]` is now `50`, and `data` has the value `60`. +The `console.log(array[0])` prints `50`, and `data` has the value `60`. **Note:** There shouldn't be any spaces between the array name and the square brackets, like `array [0]`. Although JavaScript is able to process this correctly, this may confuse other programmers reading your code.