Skip to content

Instantly share code, notes, and snippets.

@arrbxr
Created August 12, 2018 23:22
Show Gist options
  • Select an option

  • Save arrbxr/819490b34bcda98bd2c93c2725b9b68b to your computer and use it in GitHub Desktop.

Select an option

Save arrbxr/819490b34bcda98bd2c93c2725b9b68b to your computer and use it in GitHub Desktop.
confirm the ending created by arrbxr - https://repl.it/@arrbxr/confirm-the-ending
function confirmEnding(str, target) {
// "Never give up and good luck will find you."
// -- Falcor
if(str.slice(str.length-target.length) === target){
return true;
}
else
return false;
}
confirmEnding("Congratulation", "on");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment