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

输入参数检验结果是正确的,但是就是通不过运行 #637

Open
BigFatStar opened this issue Aug 28, 2019 · 0 comments
Open

Comments

@BigFatStar
Copy link

My code:

function golfScore(par, strokes) {
  // 请只修改这条注释以下的代码
  if (strokes === 1) {
    return "Hole-in-one";
  }
  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";
  }
 
  // 请只修改这条注释以上的代码
}

// 你可以修改这一行来测试你的代码
golfScore(4, 7);
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

1 participant