map, filter and reduce
These array methods transform data without writing loops. map changes each item, filter keeps some, reduce combines them into one value.
Examplejavascript
Quick check
Which method keeps only the items that pass a test?
Your turn: write the code
Use map to double every number in nums, then print the new array with console.log.
Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.
Tip: use the left and right arrow keys to move between lessons.