From 8b21132cac57317751dc4641b25203dd7cbf4432 Mon Sep 17 00:00:00 2001 From: Eric Kao Date: Sat, 3 Nov 2018 18:48:50 -0700 Subject: [PATCH] Fix line for Example (#20713) * Fix line for Example Bolded Example is inline with description. Added new line so that Example will have its own line (right before the actual example) * Add line break after Description --- .../basic-javascript/access-array-data-with-indexes.english.md | 1 + 1 file changed, 1 insertion(+) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md index 1bc915a9ec..713495ff6b 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/access-array-data-with-indexes.english.md @@ -9,6 +9,7 @@ guideUrl: 'https://www.freecodecamp.org/guide/certificates/access-array-data-wit
We can access the data inside arrays using indexes. Array indexes are written in the same bracket notation that strings use, except that instead of specifying a character, they are specifying an entry in the array. Like strings, arrays use zero-based indexing, so the first element in an array is element 0. +
Example
var array = [50,60,70];
array[0]; // equals 50
var data = array[1]; // equals 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.