我和liammclennan一起在Koans工作,而我却被困在" about_truthyness"包含以下代码的部分:
module("About Truthyness (topics/about_truthyness.js)");
test("truthyness of positive numbers", function() {
var oneIsTruthy = 1 ? true : false;
equal(true, oneIsTruthy, 'is one truthy?');
});
test("truthyness of negative numbers", function() {
var negativeOneIsTruthy = -1 ? true : false;
equal(true, negativeOneIsTruthy, 'is -1 truthy?');
});
test("truthyness of zero", function() {
var zeroIsTruthy = 0 ? true : false;
equal(false, zeroIsTruthy, 'is 0 truthy?');
});
test("truthyness of null", function() {
var nullIsTruthy = null ? true : false;
equal(false, nullIsTruthy, 'is null truthy?');
});
我收到此错误:
About Truthyness (topics/about_truthyness.js): global failure (1, 0, 1)Rerun0 ms
Uncaught SyntaxError: missing ) after argument list
Source:
https://preview.c9users.io/dyczol/koans-javascript/topics/about_assignment.js:11
提前感谢您的帮助!
答案 0 :(得分:0)
让我们看看。错误说
参数列表之后的Uncaught SyntaxError:missing)
所以我们需要知道错误的位置。它还说
来源:
https://preview.c9users.io/dyczol/koans-javascript/topics/about_assignment.js:11
因此,检查第11行并查看是否有")"在参数列表后丢失。