Nicholas Porter
1 min readJan 22, 2020

--

Interesting article, although I don’t completely agree with you. The “for of” loop is actually WAY more UNDER-performant than the “for in” loop when iterating over an arrays.

Benchmarks for 10 million iterations:
For In Loop — 16 ms
For Of — 152 ms

--

--

Nicholas Porter
Nicholas Porter

Responses (1)