Skip to content

Instantly share code, notes, and snippets.

@timhooker
Last active August 29, 2015 14:15
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 timhooker/395f2799094f655dd158 to your computer and use it in GitHub Desktop.
Save timhooker/395f2799094f655dd158 to your computer and use it in GitHub Desktop.
isPalindrome
function isPalindrome(str) {
var forward = str;
var reverse = str.split('').reverse().join('');
var result;
forward !== reverse ? result = false : result = true;
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment