for (var i = 0; i < someArray.length; i++){ // do something }
for (var x in someObject){ document.write(x + " is " + someObject[x] + "\n"); }