JavaScript Associate — Easy
Key points
- map() creates a new array based on the results of a function applied to each element.
- forEach() simply iterates over each element without creating a new array.
- filter() creates a new array with elements that pass a certain condition.
- reduce() reduces the array to a single value based on a function.
Ready to go further?
Related questions
