I'm working on Koans by liammclennan and I'm stuck on the "about_truthyness" section with the following code:
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?');
});
I'm getting this error:
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
Thanks in advance for any help!
Let's see. The error says
Uncaught SyntaxError: missing ) after argument list
So we need to know where the error is. It also says
Source:
https://preview.c9users.io/dyczol/koans-javascript/topics/about_assignment.js:11
So check line 11 and see if there is a ")" missing after an argument list.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.