Skip to main content

자릿수 더하기

Solution

function solution(n) {
return `${n}`.split("").reduce((acc, cur) => acc + Number(cur), 0);
}

Review

.

References