function getSumNumber(number) {
let toArr = number.toString().split('');
let summ = 0;
for(let i = 0; i <= toArr.length - 1; i++) {
summ += +toArr[i];
};
return summ;
};
let result = getSumNumber(58769);
console.log(result) // 35