Basic JavaScript - Golf Code

Tell us what’s happening:
Whats the use case of (par)? I dont understand.

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

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

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/ Safari/537.36

Challenge: Basic JavaScript - Golf Code

Link to the challenge:

Par represents a number that strokes (also a number) is compared against. Depending on if strokes is more than, less than, equal to par, different things should happen.
Par is just a name to represent a number. It doesn’t have special meaning within JavaScript

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