(프로그래머스) x만큼 간격이 있는 n개의 숫자

유지원·2022년 5월 20일
0

프로그래머스

목록 보기
52/66

문제 링크

https://programmers.co.kr/learn/courses/30/lessons/12954?language=javascript


Javascript

function solution(x, n) {
    return Array(n).fill(x).map((v, i) => (i + 1) * v)
}
profile
👋 https://github.com/ujw0712

0개의 댓글