DEV Community

Discussion on: Useful JS functions you aren't using: Array.map

Collapse
 
joeymink profile image
Joey Mink

Somewhat related -- if you're lazy like me, you might use map() simply to act on each item in the array (ignoring the fact that map creates a returns a new array). Don't do that! Use forEach() 👍