So What is an Array?
An array is a special variable that can hold more than one value at a time. Think of it as a big packagewith many compartments or small boxes in it. Each compartment has a different address that you can store a value in it.
Not using an Array
var box1="toys"; var box2="cars"; var box3="cellphones";
That is what most people do if they are dealing with variables and storing them individually. What if you happen to have 1000 boxes? You really can't assign 1000 variables, but rather you use an array to store them easily.
var box="toys"; var box="cars"; var box="cellphones";
Based from the above example, box contains "toys", box contains "cars" and box contains "cellphones". An array can hold many values under a single variable name and you can access each value through their index number.
Creating an Array
This how you can create an array.
var myArray = new Array(); myArray="Lego"; myArray="cars"; myArray="cellphone";
From that example, we are storing myArray() with three values. To access a single value from an array you an do this.
var toys = myArray;
The statement above stores whatever inside the address myArray. In this case we store the string "Lego" to the variable "toys".
myArray="Lego"; myArray=123; myArray=myFunction; myArray=Date.now;
There you have it, the different things you can do inside an array and how you can access it.
For more tutorials you can check out the courses from Dr. Richard Stibbard.