Last active
April 3, 2018 18:12
-
-
Save parzibyte/2a4d32d6bf4d6212499107d4e5f95054 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
function fiesta(animal, platillo) { | |
var primerLetraDePlatillo = platillo.charAt(0), | |
ultimaLetraDePlatillo = platillo.charAt(platillo.length - 1), | |
primerLetraDeAnimal = animal.charAt(0), | |
ultimaLetraDeAnimal = animal.charAt(animal.length - 1); | |
if (primerLetraDePlatillo === primerLetraDeAnimal && ultimaLetraDePlatillo === ultimaLetraDeAnimal) { | |
return true; | |
} else { | |
return false; | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment