FreeCodeCampChina/freecodecamp.cn

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

Glenn-Guo opened this issue · 1 comments

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);

Maybe it should be changed to “Over 24”