a = ;
a = 100;
a = 200;
a = 300;
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.