Skip to content

Instantly share code, notes, and snippets.

@tomrockdsouza
Created July 5, 2017 13:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomrockdsouza/b7f84b973a362a2df32cb6590cb96d77 to your computer and use it in GitHub Desktop.
Save tomrockdsouza/b7f84b973a362a2df32cb6590cb96d77 to your computer and use it in GitHub Desktop.
Small program to find if a number is a palindrome string in it's decimal form.
function palinum(a){
b=a;
c=0;
while(b!=0){
c*=10;
c+=b%10;
b/=10;
b=Math.floor(b);
}
console.log(c==a);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment