pav
9/3/2013 - 5:22 PM

array_basics

  //create an array
var myArray =  ['A','B','C','D'];

//find the length of it using .length
var arrayLength = myArray.length;

//get the first element of the array (using brackets!)
var firstElement = myArray[0];

//iterate through it, calling console.log
//for every element
for(x=0;x<arrayLength;x++){
    console.log(x);
}