mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibJS: Add BigInt
This commit is contained in:
committed by
Andreas Kling
parent
40829b849a
commit
0ff9d7e189
Notes:
sideshowbarker
2024-07-19 05:46:23 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/0ff9d7e1898 Pull-request: https://github.com/SerenityOS/serenity/pull/2509 Reviewed-by: https://github.com/alimpfard
@@ -15,6 +15,7 @@ try {
|
||||
duplicate: "world"
|
||||
};
|
||||
assert(o[1] === 23);
|
||||
assert(o[1n] === 23);
|
||||
assert(o["1"] === 23);
|
||||
assert(o.foo === "bar");
|
||||
assert(o["foo"] === "bar");
|
||||
@@ -30,6 +31,9 @@ try {
|
||||
o[10] = "123";
|
||||
assert(o[10] === "123");
|
||||
assert(o["10"] === "123");
|
||||
o[10n] = "123";
|
||||
assert(o[10] === "123");
|
||||
assert(o["10"] === "123");
|
||||
o[-1] = "hello friends";
|
||||
assert(o[-1] === "hello friends");
|
||||
assert(o["-1"] === "hello friends");
|
||||
|
||||
Reference in New Issue
Block a user