an array code example
Example 1: access index of array javascript
let first = fruits[0]
// Apple
let last = fruits[fruits.length - 1]
// Banana
Example 2: How to use an array
var fruits=["orange","apple"];
let first = fruits[0]
// Apple
let last = fruits[fruits.length - 1]
// Banana
var fruits=["orange","apple"];