Check if x is a single digit leteger
if ( x < 10 ) break ; let temp2 = 0 ; while ( x > 0 ) { temp2 += ( x % 10 ) ; x = Math . floor ( x / 10 ) ; } x = temp2 ; } if ( ( x < 10 ) && ( N == 0 ) ) { return true ; } return false ; }