Solución
solution.tsTypeScript
export function maxDigit(n: number): number {
// Escribe tu solución aquí
if( n === 0) return 0
let max = 0
while(n > 0){
let digit = n % 10
console.log(digit)
if(digit > max){
max = digit
}
n = Math.floor(n / 10)
}
return max
}0respuestas