// Sample of a normal array
var myStringArray = ["Hello","World"];
for(i = 0; i < myStringArray.length; i++)
{
console.log(myStringArray[i]);
}
// Sample of element array
var elements = document.getElementsByClassName("foo");
for(i = 0; i < elements.length; i++)
{
console.log(elements[i]);
}