function solution(n) { return [...(n+'')].map(num => +num).reduce((sum, num) => sum += num, 0) }
function solution(n) { return [...('' + n)].map(num => +num).reduce((a, c) => a + c, 0); }