Confirm the Ending
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-algorithm-scripting/confirm-the-ending
www.freecodecamp.org
function confirmEnding(str, target) {
if(str.slice(-target.length, str.length) == target) return true
return false;
}
confirmEnding("Bastian", "n");