I hate to say it like this, but I really am not catching on to this challenge. Trying to piece it up so that I do not look at the answer… Could anyone shed light here, please?
I am having a hard time understanding how to interpret the chart that we are to use to implement the if statements but I just can not seem to piece it together. Again, I really would like to understand the logic (how to implement the if statements ( stroke === 4 && par === 3 ) the relation of this code to the chart that is provided in the challenge. Thanks in advance.
**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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
I actually have, and I am alright using counters and accessing [i] of a counter BUT for some reason I just can’t see to process the interpretation of the chart used to represent the data in the tutorial itself. As I said, I took a peek but I am not trying to get the answer but the logic to how to do it myself.
Just to make it clear, I’m referring to the table in the challenge in www.freecodecamp.org that I am currently working on. The table that shows the strokes and the return or the classification based on scores " Eagle or Birdie " THAT TABLE. par + 1 , par + 3 stuff…
You don’t have to worry about iteration in this case.
Each row on the table will correspond to an if statement, where you (usually) compare strokes to par.
It would also work with the standard equality operator, ==, in this case. But we should be using strictly equal, ===, by default. The issue wasn’t that, it was that you were using the assignment operator, =, something entirely different.
I actually was not using the assignment operator man, I just could not figure out what you shared with me. That what I asked you if my interpretation was adequate => that =>