Tell us what’s happening:
Your code so far
function confirmEnding(str, target) {
var str2 = str.concat(“test”);
var split = str2.split(target);
if (split[split.length-1]===“test”) {return true;}
else {return false;}
}
console.log(confirmEnding("Bastian", "n"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:76.0) Gecko/20100101 Firefox/76.0
.
Challenge: Confirm the Ending
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-algorithm-scripting/confirm-the-endingemphasized text