Beginner - Lost Without a Map

front·2022년 11월 12일
Given an array of integers, return a new array with each value doubled.

For example:

[1, 2, 3] --> [2, 4, 6]
function maps(x){
  return x.map( num => num*2)
}
function maps(x){
  return x.map(n => n * 2);
}
profile
그냥 하기

0개의 댓글