I tried many if else conditionals to answer this question but I can't answer it, Is there any one who can help me please?

Tell us what’s happening:
Describe your issue in detail here.
this is golf code question from freecodecamp.org and I tried many code that I thought that could be the answer, but unfortunately I can’t solve this question. Is there any one who can help me please?

  **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

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

Challenge: Golf Code

Link to the challenge:

It looks like you haven’t provided any code here. What have you tried? Where did you get stuck?

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