re: What the... iterators? VIEW POST


What about the speed on iterables? How do they compare with the ol'mighty for(;;)?


I think the big difference is in readability.
If we consider that many types of "loops" hide the "iterator" property as forEach, what makes a difference for us is, for example, that forEach can not be interrupted.
Most of the times “for” is faster... but that kind of difference, on speed, is really not a big deal.

Code of Conduct Report abuse