Tell us what’s happening:
Your code so far
function confirmEnding(str, target) {
if (str.substring(str.length -1 === target)) {
return true;
} else {
return false;
}
}
confirmEnding("Bastian", "n");
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) 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