Last active
July 21, 2017 22:58
-
-
Save raullucero/2a4ab5a781a252a376622d68f29a8010 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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