function solution(n) { let answer = 0; const arr = n.toString().split(''); for(let i in arr){ answer += Number(arr[i]); } return answer; }
성공