Solución
solution.tsTypeScript
export function isCapicua(n: number): boolean {
const num = n.toString()
if(num.length == 1) return true
const reverse = num.split('').reverse().join('')
if(num === reverse) return true
return false;
}
0respuestas