3 ms·
Yes, there's a note right after: Note that this trick should only be used for arrays which you know do not contain "falsy" values (arrays of objec
by joebadmo 13y ago
Yes, there's a note right after:
Note that this trick should only be used
for arrays which you know do not contain
"falsy" values (arrays of objects or DOM
nodes for example). If you are iterating
over numeric data that might include a 0
or string data that might include the
empty string you should use the i, len
idiom instead.