Tagged in

Maps

Daily JS Tips
Daily JS Tips
Daily tips about JavaScript :)
More information
Followers
855
More, on Medium

Replace your loops by Array methods - map()

In the last article, I wrote about forEach() method. In these, I will show you the map() method :)

One thing I had not shown, is about second argument of the forEach(). You can pass an object - in this case, an array -, that…