SyntaxError: unknown: Unexpected token every time

Tell us what’s happening:
Describe your issue in detail here.
Hi, Sorry im sure this is stupidly simple but it has be stumped

on the last 2-3 pages i get the error “SyntaxError: unknown: Unexpected token” complaining about the final character of the code in the part i’m not supposed to change. I dont understand whats going wrong and my code looks the same as the given solution to me. Thankyou for your help
the error text:


SyntaxError: unknown: Unexpected token (22:16)

  20 | }
  21 | // Change these values to test
> 22 | golfScore(5, 4);
     |                 ^
  **Your code so far**

const names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];

function golfScore(par, strokes) {
// Only change code below this line
if(strokes == 1){
return names[0]
} else if(strokes <= par -2){
return names [1]
} else if(strokes == par -1){
return names [2]
} else if(strokes == par){
return names [3]
} else if(strokes == par +1){
return names [4]
} else if(strokes == par +2){
return names [5]
} else{ 
return names [6]

}
// Change these values to test
golfScore(5, 4);
  **Your browser information:**

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

Challenge: Golf Code

Link to the challenge:

Hello there @toby1234, welcome to the forum.

As you can see above you are missing the closing bracket for the function as a whole. These things happen. Good luck.

I copied your code, added a bracket like below, and it passed. Like so:

else{ 
return names [6]
} 
}