Skip to content

Instantly share code, notes, and snippets.

Created December 6, 2015 03:52
Show Gist options
  • Save anonymous/abe370fcc92dd95591de to your computer and use it in GitHub Desktop.
Save anonymous/abe370fcc92dd95591de to your computer and use it in GitHub Desktop.
http://www.freecodecamp.com/fcc0208647c 's solution for Bonfire: Confirm the Ending
// Bonfire: Confirm the Ending
// Author: @fcc0208647c
// Challenge: http://www.freecodecamp.com/challenges/bonfire-confirm-the-ending#
// Learn to Code at Free Code Camp (www.freecodecamp.com)
function end(str, target) {
if (str.slice(str.length-target.length, str.length) == target){
return true;
} else {
return false;
}
}
end("Bastian", "n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment