Skip to content

Instantly share code, notes, and snippets.

@jgarciaruiz
Created December 22, 2015 15:03
Show Gist options
  • Save jgarciaruiz/01b091d8ddfa3d4b975b to your computer and use it in GitHub Desktop.
Save jgarciaruiz/01b091d8ddfa3d4b975b to your computer and use it in GitHub Desktop.
function checkPalindrome(thestr) {
var reverseStr = thestr.split('').reverse().join('');
if (thestr == reverseStr){
return "yay";
}else{
return "nope"
}
}
//checkPalindrome("aba");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment