π map() vs forEach() in JavaScript β Which One Should You Use?
When looping over arrays in JavaScript, two popular methods are:
forEach()
map()
They look similar β but they have different purposes.
β
forEach() β Just Do Something
Use forEach() when you want to run a function for each item, but you donβt car...
code-odyssey.hashnode.dev1 min read