Beginner - Lost Without a Map

Given an array of integers, return a new array with each value doubled.

 


[1, 2, 3] --> [2, 4, 6]

Solutions

Solution: 1

function maps(x){
  return x.map(x=>2*x);
}