Anyway, we can use below type of for loop for achieving the same result of foreach loop.
var arrItems = ["item1","item2","item3"];
for ( var i in arrItems )
alert( arrItems[i] );
The above code will alert each item in the array one by one.