Test cases not passing getting error for first and last cases

Tell us what’s happening:
i am unable to get all the test cases to pass despite according to me putting in the correct logic please help

Your code so far

var names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];
function golfScore(par, strokes) {
// Only change code below this line
return "Hole-in-one";
else if(strokes<=par-2){
return "Eagle";
else if(strokes==par-1){
return "birdie";
else if(strokes==par){
return "Par";
else if(strokes==par+1){
return "Bogey";
else if(strokes==par+2){
return "Double Bogey";
else if (strokes==par+3){
return "Go Home";
return "Change Me";}
// Only change code above this line

golfScore(5, 4);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1 Safari/605.1.15.

Challenge: Golf Code

Link to the challenge:

“Hole-in-one” is not the same as “Hole-in-one!”. “birdie” is not the same as “Birdie”. And so on.

You can use the names array directly to avoid copy-paste errors if you like.

oops thanks a ton mate!

I’m glad I could help. Happy coding!