mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-06 08:36:15 +00:00
This patch adds js_nan() for constructing a NaN value. You can check if a Value is NaN with Value::is_nan().
10 lines
179 B
JavaScript
10 lines
179 B
JavaScript
function assert(x) { if (!x) throw 1; }
|
|
|
|
try {
|
|
var nan = undefined + 1;
|
|
assert(nan + "" == "NaN");
|
|
console.log("PASS");
|
|
} catch (e) {
|
|
console.log("FAIL: " + e);
|
|
}
|