# Golf Code Help with this challenge

**URL:** <https://forum.freecodecamp.org/t/golf-code-help-with-this-challenge/215552>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [August 7, 2018, 4:53pm UTC](https://forum.freecodecamp.org/t/golf-code-help-with-this-challenge/215552 "2018-08-07T16:53:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dadir](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dadir/32/96280_2.png) [@Dadir](https://forum.freecodecamp.org/u/Dadir)\
**Post date:** [August 7, 2018, 4:53pm UTC](https://forum.freecodecamp.org/t/golf-code-help-with-this-challenge/215552/1 "2018-08-07T16:53:43Z")

</div>

**Tell us what’s happening:**  
I am lost here. I do not know how I should proceed from here. How should I go about this? Is it par or strokes that comes first or is it the number? How should I go about this?

**Your code so far**

```js

var names = ["Hole-in-one!", "Eagle", "Birdie", "Par", "Bogey", "Double Bogey", "Go Home!"];
function golfScore(par, strokes) {
  // Only change code below this line
if (strokes < par) {
  return "Hole-in-one"
}  
  
  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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36`.

**Link to the challenge:**

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/golf-code)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![zapcannon99](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/zapcannon99/32/94297_2.png) [@zapcannon99](https://forum.freecodecamp.org/u/zapcannon99)\
**Post date:** [August 7, 2018, 4:59pm UTC](https://forum.freecodecamp.org/t/golf-code-help-with-this-challenge/215552/2 "2018-08-07T16:59:04Z")

</div>

Start at one extreme and then work your way to the other.

---

<div class="post-metadata">

**Author:** ![Dadir](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/dadir/32/96280_2.png) [@Dadir](https://forum.freecodecamp.org/u/Dadir)\
**Post date:** [August 7, 2018, 5:11pm UTC](https://forum.freecodecamp.org/t/golf-code-help-with-this-challenge/215552/3 "2018-08-07T17:11:27Z")

</div>

Thanks . I figured it out along the way. 😃

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [February 2, 2021, 11:36am UTC](https://forum.freecodecamp.org/t/golf-code-help-with-this-challenge/215552/4 "2021-02-02T11:36:08Z")

</div>

Closed on February 2, 2021, 11:36am UTC


