Skip to content

Instantly share code, notes, and snippets.

@raullucero
Last active Jul 21, 2017
Embed
What would you like to do?
// PROBLEMA: Checar si una palabra es palindroma o no
// racecar
// car
// dog
function isPalindrome(word) {
return word === word.split('').reverse().join();
}
//que pasa cuando tienes ' racecar'
function isPalindrome(word) {
return word.trim() === word.trim().split('').reverse().join()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment