Please help me find out what went wrong

Please help me find out what went wrong
0.0 0

#1

Tell us what’s happening:
Hello everyone here.
Could anyone possibly tell me what went wrong here? Why can’t I use “else” to return false?
Many thanks!

Your code so far

function confirmEnding(str, target) {
   if (target === str.substr(-target.length));{
     return true;
   }
else 
  return false;
   }
confirmEnding("Bastian", "n");

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.162 Safari/537.36.

Link to the challenge:


#2

You have a semicolon after your if condition.


#3

Thank you so much. I should have scooped my useless eyes out.


#4