FreeCodeCampChina / FreeCodeCampChina/freecodecamp.cn

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

Open
#638 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
CSS
Stars
37.8k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

Challenge [Comparison with the Less Than Or Equal To Operator](https://www.freecodecamp.cn/challenges/comparison-with-the-less-than-or-equal-to-operator#?solution=function%20myTest(val)%20%7B%0A%20%20if%20(val%20%3C%3D%2012)%20%7B%20%20%2F%2F%20%E8%AF%B7%E4%BF%AE%E6%94%B9%E8%BF%99%E4%B8%80%E8%A1%8C%0A%20%20%20%20return%20%22Smaller%20Than%20or%20Equal%20to%2012%22%3B%0A%20%20%7D%0A%20%20%0A%20%20if%20(val%3C%3D%2024)%20%7B%20%20%2F%2F%20%E8%AF%B7%E4%BF%AE%E6%94%B9%E8%BF%99%E4%B8%80%E8%A1%8C%0A%20%20%20%20return%20%22Smaller%20Than%20or%20Equal%20to%2024%22%3B%0A%20%20%7D%0A%0A%20%20return%20%2225%20or%20More%22%3B%0A%7D%0A%0A%2F%2F%20%E4%BD%A0%E5%8F%AF%E4%BB%A5%E4%BF%AE%E6%94%B9%E8%BF%99%E4%B8%80%E8%A1%8C%E6%9D%A5%E6%B5%8B%E8%AF%95%E4%BD%A0%E7%9A%84%E4%BB%A3%E7%A0%81%0AmyTest(24.5)%3B%0A%0A) 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:
```javascript
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);

```

Contributor guide

Open the contributing guide

Research direction

Open the linked “Comparison with the Less Than Or Equal To Operator” challenge and reproduce the report with the provided code and myTest(24.5). Compare the observed result with the challenge’s expected behavior; the issue does not identify a repository file, test, or specific change needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
content
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.