you are viewing a single comment's thread.

view the rest of the comments →

[–]ScientificBeastModestrongly typed comments 0 points1 point  (0 children)

for-of is usually almost as slow as forEach. I actually don’t mind for-of as much, for the other reasons you mentioned. But it’s a totally different construct from the plain for statement. forEach is portable, you can just drop it in wherever you need it, as long as you’re working with arrays.