Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array index javascript

let fruits = ['Apple', 'Banana']
let first = fruits[0]
// Apple

let last = fruits[fruits.length - 1]
// Banana
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #array #index #javascript
ADD COMMENT
Topic
Name
1+4 =