In the following code, from 'Secrets of the JavaScript Ninja,' why does 'Another test.' show up in red font? http://jsfiddle.net/dtHyc/
Solution 1:
Since a string is truthy ("Second test failed" != false
),
assert(false, "Second test failed");
returns false
, which invalidates the whole test.
Post a Comment for "Understanding Javascript Styling"