1var array = [item1, item2, .....];
2/*
3
4 item1 and item2 could be a string (which is
5 a letter written in double or single quotes like this "string" or 'string') or
6 a number (which is just a normal number on the keypad) or a boolean (which is
7 an experssion which either returns to true of false) and the ..... means that
8 the inputs can be infinite.
9
10*/
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*/];
1let arr = new Array(element0, element1, ..., elementN)
2let arr = Array(element0, element1, ..., elementN)
3let arr = [element0, element1, ..., elementN]
4
1//Im using a let type variable for the example because it's what i reccomend
2
3let exampleArray = ["Example", "Lorem Ispum Dolor", "I think you've got it"]
4
5//Here's how you select a single object in the list
6
7exampleArray[1]
8
9/*In Javascript the arrays start counting at 0 which means i selected the 2nd
10object in the list(Lorem Ispum Dolor) so if i wanna select the first array i
11must type*/
12
13exampleArray[0]
14
15/*Now let's say you want to display it on the console, like let's say you are
16coding in Node.js and you wanna see the value of the array.
17P.S: In the example im gonna show all the values of the array.*/
18
19console.log(exampleArray[0, 1, 2]