When should I use
.map()? When should I use a
.map() when you want to create a new array of transformed values of the original array by iterating over and calling a function on every element of said original array. Use a
for loop when you need a less specialized and more flexible iterator.