Function to reverse the number
function reverse ( number ) { var reverse = 0 ; while ( number > 0 ) { var remainder = number % 10 ; reverse = ( reverse * 10 ) + remainder ; number = parseInt ( number / 10 ) ; } return reverse ; }