Golf Code tutorial

Tell us what’s happening:
I’m not understanding.

Your code so far

var 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

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

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:63.0) Gecko/20100101 Firefox/63.0.

Link to the challenge:

What part don’t you understand. It doesn’t look like you’ve tried anything yet.

I later got it, but please why should I use (strokes == I)

That would depend on the rest of your code.

1 Like