Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Last active April 3, 2018 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/2a4d32d6bf4d6212499107d4e5f95054 to your computer and use it in GitHub Desktop.
Save parzibyte/2a4d32d6bf4d6212499107d4e5f95054 to your computer and use it in GitHub Desktop.
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