Does JavaScript array.forEach traverse elements in ascending order

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.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)