FreeCodeCampChina / freecodecamp.cn

FCC China open source codebase and curriculum. Learn to code and help nonprofits.
https://fcc.asia/
Other
36.73k stars 1.36k forks source link

"25 or More" is wrong ,but I can't fix it. #638

Open Glenn-Guo opened 4 years ago

Glenn-Guo commented 4 years ago

Challenge Comparison with the Less Than Or Equal To Operator has an issue. User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.25 Safari/537.36 Core/1.70.3730.400 QQBrowser/10.5.3805.400. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

function myTest(val) {
  if (val <= 12) {  // 请修改这一行
    return "Smaller Than or Equal to 12";
  }

  if (val<= 24) {  // 请修改这一行
    return "Smaller Than or Equal to 24";
  }

  return "25 or More";
}

// 你可以修改这一行来测试你的代码
myTest(24.5);
Glenn-Guo commented 4 years ago

Maybe it should be changed to “Over 24”