DEV Community

loading...

Discussion on: Uncomplicated - (for ... in) VS (for ... of) loop

Collapse
lukeshiru profile image
LUKESHIRU

Nice coverage of the issues you can run into with enumerables and for!

Remember that you can always use methods like Array.prototype.map to loop over an array, and if you want to loop over the properties of an object, you can use the handy static method Object.entries

Cheers!