Back

Array Methods / Double All Numbers

00:00
1/20

Double All Numbers

Easy

Write a function doubleNumbers(arr) that uses .map() to return a new array where every number is doubled.

  • 1

    Call the .map() method on the array.

  • 2

    In the callback, return num * 2.

JAVASCRIPT PLAYGROUND
JAVASCRIPT PLAYGROUND
⏳ Loading editor…