I cant find the issue

Tell us what’s happening:
I literally dont know why this code isnt working, I even pulled up the solution and went through every character side by side and it is exatly identical.

   **Your code so far**

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

function golfScore(par, strokes) {

if (strokes = 1) {
  return names[0];
} else if (strokes  <= par - 2) {
  return names[1];
} else if (strokes === par - 1) {
  return names[2];
} else if ( storkes === par) {
  return names[3];
} else if ( strokes === par + 1) {
  return names[4];
} else if (strokes === par + 2) {
  return names[5];
} else if (strokes >= par + 3){
  return names[6];

 // Only change code above this line

golfScore(6, 4);
   **Your browser information:**

User Agent is: Mozilla/5.0 (X11; CrOS aarch64 14324.62.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.77 Safari/537.36

Challenge: Golf Code

Link to the challenge:

Use the == or === equality operator here.

I think the spelling is strokes and NOT storkes

Hope this helped :slight_smile:

Thank you I didnt realize the differece in the assignment and equality sign!


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.