reverse number
<html> <body> <script> var number=23781; var reverse=0; do{ var lastDigit=number%10; reverse=(reverse*10)+lastDigit; number=number/10; }while(number>=1); alert("Thar number reversed is"+reverse); </script> </body> </html>
<html> <body> <script> var number=23781; var reverse=0; do{ var lastDigit=number%10; reverse=(reverse*10)+lastDigit; number=number/10; }while(number>=1); alert("Thar number reversed is"+reverse); </script> </body> </html>