DEV Community

loading...

Discussion on: How To For Loop Through Anything in JS

patarapolw profile image
Pacharapol Withayasakpunt

I meant arr.forEach() vs arr.map().

for of and for in are another species, and is whether you want it to be functional or procedural. Neither is better than the others.