blob: 75ae62f16e8869a86180c928802206fed0c8d7e5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
function assert(x) { if (!x) throw 1; }
try {
var nan = undefined + 1;
assert(nan + "" == "NaN");
assert(isNaN(nan) === true);
assert(isNaN(0) === false);
assert(isNaN(undefined) === true);
assert(isNaN(null) === false);
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}
|