I have no experience in programming yet, but I am ready to study hard in order to become a professional in the field of programming in the future and share my experience with others
2012-2016 | Marketing
function squareDigits(num){
let str = num.toString(),
arr = str.split(''),
arrMult = +arr.reduce((total, amount) => {
total.push(Math.pow(amount, 2));
return total;
}, []).join('');
return arrMult;
}
squareDigits(185); // 16425
More examples in my Codewars account