[다른 답안 코드]
function solution(x, n) { var answer = []; for(let i = 1; i<= n; i++){ answer.push(x*i) } return answer; } console.log(solution(2,5))