undefined
?function getSum(num) {
var number = "" + num;
if (number.length > 1) {
sum = number.split('').reduce(function (s, val) {
return +s + +val;
});
getSum(sum);
} else {
return number;
}
};
console.log(getSum(68));
undefined
. return
перед getSum(sum)
.