Array Operations

Learn JavaScript array-related methods that favor a functional programming style.

Functional programming is about writing programs by combining functions expressing what the program should do, rather than how to do it.

The map() method

The map() method takes an array as a parameter and creates a new array with the results of calling a provided function on every element in this array. A typical use of map() is to replace a loop for array traversal. Let’s see the map() function in action.

Get hands-on with 1200+ tech skills courses.