Summary: in this tutorial, you will learn how to use the JavaScript Array map() method to transform elements in an array.
Introduction to JavaScript Array map() method
Sometimes, you need to take an array, transform its elements, and include the results in a new array.
Typically, you use a for loop to iterate over the elements, transform each individual one, and push the results into a new array.
Let’s take a look at an example.
...
https://www.youtube.com/watch?v=W-6XptI-t2g