Skip to content

Instantly share code, notes, and snippets.

@BeKnowDo
Created June 12, 2017 18:41
Show Gist options
  • Save BeKnowDo/f2e044858bf2c3b14ab7841f24f9ffb1 to your computer and use it in GitHub Desktop.
Save BeKnowDo/f2e044858bf2c3b14ab7841f24f9ffb1 to your computer and use it in GitHub Desktop.
Palindrome
function palindrome(string) {
let reverseString = string.split('').reverse().join('')
return reverseString === string
}
document.querySelector('#test').innerHTML = palindrome('level')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment