Help with Golf Code

I dont know what I might be doing wrong but I feel really dumb and ready to just quit. Ive struggled to understand what free code camp is trying to teach and I just feel inadequate enough to stop right here and never try again. To anyone else Im sure you will breeze through this (or learn how to do it properly) but I just feel so lost.

if(strokes == 1) {

  return "Hole-in-one!";

} else if(strokes  <= par -2) {

  return "Eagle";

} else if(strokes == par - 1) {

  return "Birdie";

} else if(strokes == par) {

  return "Par";

} else if(strokes == par + 1) {

  return "Bogey";

} else if(strokes  >= par + 2) {

  return "Double Bogey"

} else { (strokes >= par + 3) 

  return "Go Home!";

}
1 Like

Please include a link to the challenge and your full code. Thanks.

The error is in the last else clause

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