Golf Code, why do I even need "par" when "stroke" is enough?

Golf Code, why do I even need "par" when "stroke" is enough?
0

#1

Tell us what’s happening:

Hey, I’d like to know what the “par” thing represents in the golf game? Isnt it enough to just build something with if (strokes …) , leaving the “par” term completly out or am i missing something?

Your code so far

function golfScore(par, strokes) {
  // Only change code below this line
  if (strokes)
  
  return "Change Me";
  // Only change code above this line
}

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

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:55.0) Gecko/20100101 Firefox/55.0.

Link to the challenge:


#3

The term “par” represents the maximum stroke value expected for a given hole of golf. The number of “strokes” indicates the number swings of a golf club it actually took the player to complete the hole. The golf player’s goal is to complete the hole with less than or equal to the “par” number. The input parameters could be named like this and would have the same meaning:

function golfScore(expected, actual) {
  // Only change code below this line
  if (actual)
  
  return "Change Me";
  // Only change code above this line
}

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