Tell us what’s happening:
function confirmEnding(first, second) {
if (first.slice(-second.length) === second) {
return true
} else {
return false
}
}
This fails the tests from nos 3-11 even though when testing in vscode the expected result is returned.
Your code so far
function confirmEnding(first, second) {
if (first.slice(-second.length) === second) {
return true
} else {
return false
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36
Challenge Information:
Build a Confirm the Ending Tool - Build a Confirm the Ending Tool