You are viewing a single comment's thread. Return to all comments →
Solution in TS
function findDigits(n: number): number { let stringNumber = n.toString(); let count = 0; for(let i = 0; i < stringNumber.length; i++){ let tempNumber = parseInt(stringNumber.charAt(i)); if(tempNumber != 0 && (n % tempNumber === 0)){ count++; } } return count; }
Seems like cookies are disabled on this browser, please enable them to open this website
Find Digits
You are viewing a single comment's thread. Return to all comments →
Solution in TS