freecodecamp.cn
freecodecamp.cn copied to clipboard
条件使用 12==var 也是对的,但是无法通过测试。
Challenge Comparison with the Equality Operator has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
// Setup
function myTest(val) {
if (12 == val) { // Change this line
return "Equal";
}
return "Not Equal";
}
// Change this value to test
myTest(12);
条件使用 12==var 也是对的,但是无法通过测试。
建议携程val == 12 ,可读性较好。
可以通过
我这里怎么显示 最后一项(你应该使用 == 运算符)不能通过? 不能贴图。:(