|
|
|
|
|
by blymphony
2060 days ago
|
|
Isn't it a good habit to store the length of the array regardless of browser implementation? Technically, accessing a variable is simply faster than a property access on an object, and this wouldn't be a case of premature optimization either--just sound coding practice. |
|
It doesn't really matter nowadays anyway, because now I write my for-each loops like:
or (Well, technically now I write Android & C++ code and do leadership/communication stuff, but I brushed up on my ES6 before getting the most recent job.)