1// Don't need to provide elements directly, but you can
2
3// FIRST OPTION
4var myArray = new Array(/*elements1, elements2*/);
5
6// SECOND OPTION
7var mySecondArray = [/*element1, element2*/];
1var colors = [ "red", "orange", "yellow", "green", "blue" ]; //Array
2
3console.log(colors); //Should give the whole array
4console.log(colors[0]); //should say "red"
5console.log(colors[1]); //should say "orange"
6console.log(colors[4]); //should say "blue"
7
8colors[4] = "dark blue" //changes "blue" value to "dark blue"
9console.log(colors[4]); //should say "dark blue"
10//I hope this helped :)
1let first = fruits[0]
2// Apple
3
4let last = fruits[fruits.length - 1]
5// Banana
6