const superDigit = (n, k) => { n = n.split("").reduce((a, b) => { return +a + +b; }) * k + ""; return n.length > 1 ? superDigit(n, 1) : n.charAt(0); }; console.log(superDigit("148", 3));
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)