Tell us what’s happening:
Your code so far
function confirmEnding(str, target) {
if (str.substring(-(target.length))){
return true;
}
return false;
}
confirmEnding("Bastian", "n");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/confirm-the-ending