https://www.codewars.com/kata/57f781872e3d8ca2a000007e
Codewars - Achieve mastery through coding practice and developer mentorship
A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages!
www.codewars.com
DESCRIPTION:
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(v => v * 2);
}
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Find the unique number (6 kyu) / JavaScript (0) | 2023.01.05 |
---|---|
[Codewars] A Needle in the Haystack (8 kyu) / JavaScript (0) | 2023.01.04 |
[Codewars] String ends with? (7 kyu) / JavaScript (1) | 2023.01.02 |
[Codewars] Moving Zeros To The End (5 kyu) / JavaScript (0) | 2022.12.31 |
[Codewars] Is n divisible by x and y? (8 kyu) / JavaScript (0) | 2022.12.30 |
댓글