DEV Community

loading...

Discussion on: Better loops in JavaScript

Collapse
hamedqaderi profile image
Hamm 🐘

Nice article. Thanks, Kartik. By the way, there is a little note to mention. It's better to use (for in) for objects and (for of) for arrays. Because (for in) has been optimized for Objects and not arrays.

Collapse
kartik2406 profile image
Kartik Malik Author

Oh cool, I didn't know that. Thanks for sharing :)