``````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
}else if(strokes <= par-2){
return names
}else if(strokes= par-1){
return names
}else if( strokes = par){
return names
}else if(strokes = par+1){
return names
}else if(strokes= par+2){
return names 
}if(strokes >= par +3 ){
return names
}else{

return "Change Me";
}
// Only change code above this line
}

golfScore(5, 4);
``````

What is the url for this challenge?

In the game of Golf, each hole has a `par`, meaning, the average number of `strokes` a golfer is expected to make in order to sink the ball in the hole to complete the play. Depending on how far above or below `par` your `strokes` are, there is a different nickname.

Your function will be passed `par` and `strokes` arguments. Return the correct string according to this table which lists the strokes in order of priority; top (highest) to bottom (lowest):

Strokes Return
1 “Hole-in-one!”
<= par - 2 “Eagle”
par - 1 “Birdie”
par “Par”
par + 1 “Bogey”
par + 2 “Double Bogey”
>= par + 3 “Go Home!”

`par` and `strokes` will always be numeric and positive. We have added an array of all the names for your convenience.

After looking at your code, you seem to be confusing the equality operator with the assignment operator.

1 Like

thanks let me try and chance

i chance = into == but still erro

that is my full code

``````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
}else if(strokes <= par-2){
return names
}else if(strokes== par-1){
return names
}else if( strokes == par){
return names
}else if(strokes == par+1){
return names
}else if(strokes= par+2){
return names 
}else if(strokes >= par +3 ){
return names
}else{

return "Change Me";
}
// Only change code above this line
}

golfScore(5, 4);
``````

You still have two assignment operators.

yes yes you are rigth thanks very much