Edit in JSFiddle

//iterate through each array item with forEach

var myArray = ['Boston','New York','Chicago','Miami','Los Angeles','Dallas','Seattle'];

	document.getElementById("output").innerHTML += (i+1) + ": " + item + "<br />";
<!-- Easy JavaScript #26 - the forEach method-->
Welcome to the 26th Easy JavaScript tutorial, part of <a href="http://www.easyprogramming.net" target="_blank">EasyProgramming.net</a>. This tutorial covers the <code>forEach</code> array method as part of our coverge of JavaScript loops!
The <code>forEach</code> method iterates through each array item and executes a block of code. It will complete when it has gone through every item in the array.
Syntax of the <code>forEach</code> method:

  array.forEach(function(item, index){
    execute code;
    the 'item' is the actual value;
    'index' is the index number (e.g. i);

<span id="output"></span>
W3Schools: <a href="http://www.w3schools.com/jsref/jsref_forEach.asp" target="_blank">http://www.w3schools.com/jsref/jsref_forEach.asp</a>