const ageSumDigits = (age1, age2, age3) => { return (age1+'').split('').map(n => parseInt(n)).reduce((n, m) => n + m) < age2 + age3; }
- const ageSumDigits = (age1, age2, age3) => {
const sumOfDigits = num => [...`${num}`].reduce((sum,digit) => sum+Number(digit),0);return sumOfDigits(age2)+sumOfDigits(age3) > sumOfDigits(age1);- return (age1+'').split('').map(n => parseInt(n)).reduce((n, m) => n + m) < age2 + age3;
- }