Creating Array
The most basic way to create an array is defining variable as array using brackets ([ ]).
var myArray = [];
Variable myArray is now empty array, or array with no value in it. To put value inside, you have to determined where in array you want put that value.
var myArray = [];
myArray[0] = 500;
That means you put 500 in index of 0, the first position. You can easily put other value using the same way.
var myArray = [];
myArray[0] = 500;
myArray[1] = 600;
myArray[2] = "test";
Or, like before, you can write all element when you first declared an array.
var myArray = [500, 600, "test"];