Skip to content

Instantly share code, notes, and snippets.

@dragonza
Created January 28, 2018 15:42
Show Gist options
  • Select an option

  • Save dragonza/6efb6271c02b9842060084fd509ee3f5 to your computer and use it in GitHub Desktop.

Select an option

Save dragonza/6efb6271c02b9842060084fd509ee3f5 to your computer and use it in GitHub Desktop.
Palindromes
function palindrome(str) {
const reversed = str.split('').reverse().join('');
return str === reversed;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment