freecodecamp.cn icon indicating copy to clipboard operation
freecodecamp.cn copied to clipboard

JavaScript 不等于比较运算符!= 答案不全 val != 99 或者 val !="99" 都可以

Open KaapoMarcus opened this issue 9 years ago • 2 comments

Challenge Comparison with the Inequality Operator has an issue. User Agent is: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

// Setup
function myTest(val) {
if (val != 99) { // Change this line
return "Not Equal";
}
return "Equal";
}

// Change this value to test
myTest(1);

KaapoMarcus avatar Jan 06 '17 08:01 KaapoMarcus

我明白你意思,确实 if (val != “99”) 也应该过测试,不过你给的链接并不是freecodecamp.cn 我等下就发个PR改了这个问题

wudifeixue avatar Feb 14 '17 20:02 wudifeixue

#153 will fix this after merge.

wudifeixue avatar Feb 14 '17 20:02 wudifeixue