FreeCodeCampChina / FreeCodeCampChina/freecodecamp.cn

"9 or Under" is wrong ,but I can't fix it.

Open
#639 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 Greater Than Or Equal To Operator](https://www.freecodecamp.cn/challenges/comparison-with-the-greater-than-or-equal-to-operator#?solution=function%20myTest(val)%20%7B%0A%20%20if%20(val%20%3E%3D%2020)%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%2220%20or%20Over%22%3B%0A%20%20%7D%0A%20%20%0A%20%20if%20(val%20%3E%3D%2010)%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%2210%20or%20Over%22%3B%0A%20%20%7D%0A%0A%20%20return%20%229%20or%20Under%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(9.5)%3B%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 >= 20) { // 请修改这一行
return "20 or Over";
}

if (val >= 10) { // 请修改这一行
return "10 or Over";
}

return "9 or Under";
}

// 你可以修改这一行来测试你的代码
myTest(9.5);

```

Contributor guide

Open the contributing guide

Research direction

Open the linked “Comparison with the Greater Than Or Equal To Operator” challenge and reproduce the behavior with the provided myTest(9.5) example. Compare the observed result with the challenge’s stated expectations, then confirm the challenge content or validation gives the intended result for decimal inputs.

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
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.