Closed yakra closed 6 years ago
Nope. That would be forEach
, in the case of arrays.
The forEach() method calls a provided function once for each element in an array, in order; it's not worth the complication of writing new functions to change this, where it can be done.
Will keep this in mind when tackling tile rendering, though.
for (i = 0 ; i < MyArray.length; i++) DoStuff()
->for (var foobars in MyArray) DoStuff()
as appropriate