3 ms·
for/of is an iterator. It consumes the Symbol.iterator interface and is totally different from the for(i++) statement. That eslint rule is a good example of a
by hombre_fatal 6y ago
for/of is an iterator. It consumes the Symbol.iterator interface and is totally different from the for(i++) statement.
That eslint rule is a good example of a cargo cult. The second link in its rationalization argues for using underscore over touching a dangerous loop yourself.