Golf Code issues

Golf Code issues
0

#1

Tell us what’s happening:
I’ve been trying to make the golfScore(4, 1) return “Hole-in-One” and it keeps telling me I am wrong? What is the issue in this code?

Your code so far

function golfScore(par, strokes) {
  // Only change code below this line
  if (par >= 3 && strokes == 1)
    {
      return "Hole-in-One!";
    }
  
  return "Change Me";
  // Only change code above this line
}

// Change these values to test
golfScore(4, 1);

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0.

Link to the challenge:


#2

Check your capitals :wink:

Also, I assume you know this and you’re just trying to pass that first test first, but just in case: this challenge requires more than just the Hole-in-one case

Happy coding!


#3

Haha the little mistakes I make and I’ve been coding for years! :joy: Thank you!