Tell us what’s happening:
I tested all requests and works, but not sure why can’t pass from step 3, thanks.
Your code so far
function confirmEnding(words, check){
if(words.slice(- check.length) === check)
{
return "true";
}
else
{ return "false";};
};
console.log(confirmEnding("Bastian","n"));
console.log(confirmEnding("Congratulation","on"));
console.log(confirmEnding("Connor","n"));
console.log(confirmEnding("Walking on water and developing software from a specification are easy if both are frozen", "specification"));
console.log(confirmEnding("He has to give me a new name","name"));
console.log(confirmEnding("Open sesame","same"));
console.log(confirmEnding("Open sesame","sage"));
console.log(confirmEnding("If you want to save our world, you must hurry. We don't know how much longer we can withstand the nothing","mountain"));
console.log(confirmEnding("Abstraction","action"));
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36 Edg/143.0.0.0
Challenge Information:
Build a Confirm the Ending Tool - Build a Confirm the Ending Tool