mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 21:29:06 +00:00
LibJS: Add NaN to global object
This commit is contained in:
parent
2577712a1c
commit
a0da97cb5a
Notes:
sideshowbarker
2024-07-19 08:00:34 +09:00
Author: https://github.com/linusg
Commit: a0da97cb5a
Pull-request: https://github.com/SerenityOS/serenity/pull/1570
2 changed files with 5 additions and 0 deletions
|
@ -3,7 +3,11 @@ function assert(x) { if (!x) throw 1; }
|
|||
try {
|
||||
var nan = undefined + 1;
|
||||
assert(nan + "" == "NaN");
|
||||
assert(NaN + "" == "NaN");
|
||||
assert(nan !== nan);
|
||||
assert(NaN !== NaN);
|
||||
assert(isNaN(nan) === true);
|
||||
assert(isNaN(NaN) === true);
|
||||
assert(isNaN(0) === false);
|
||||
assert(isNaN(undefined) === true);
|
||||
assert(isNaN(null) === false);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue