Skip to content

Instantly share code, notes, and snippets.

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