how to print the index of an array as a new list in javascript code example
Example 1: javascript element in array
var fruits = ["Banana", "Orange", "Apple", "Mango"];
var n = fruits.includes("Mango");
Example 2: access index of array javascript
let first = fruits[0]
// Apple
let last = fruits[fruits.length - 1]
// Banana