In JavaScript I can have an array with holes:
a = [];
a[0] = 100;
a[5] = 200;
a[3] = 300;
a.forEach(function(x) {alert(x);});
I could not
The ECMA-262, 5th edition specification and MDN's Array.forEach() page both show the algorithm for .forEach(), and it will definitely iterate over array elements in ascending index order (skipping indices that were never assigned a value).
Of course, some browsers may not implement that algorithm properly, but I'm not aware of any that don't.