Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test cases are returning the correct value in the console, but it won't let me pass the challenge #6880

Closed
EthanDavis opened this issue Feb 11, 2016 · 3 comments

Comments

@EthanDavis
Copy link

Challenge Golf Code has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.109 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function golfScore(par, strokes) {
  // Only change code below this line
    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 if(strokes >= par + 3){
    return "Go Home!";
  }
  // Only change code above this line
}

// Change these values to test
golfScore(1, 1);
@mohannadsawalhi
Copy link

return "Hole-in-one!";

-!-

@alekasantos
Copy link

I have the same issue.

@alekasantos
Copy link

I found out the problem, the text in the return should match exaclty as mentioned by their text, for example, it should be Go Home!, not Go home

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants