mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 04:09:13 +00:00
LibJS: Implement modulo assignment operator (%=)
This commit is contained in:
parent
a2e1f1a872
commit
72d2bd56ce
Notes:
sideshowbarker
2024-07-19 06:57:53 +09:00
Author: https://github.com/linusg
Commit: 72d2bd56ce
Pull-request: https://github.com/SerenityOS/serenity/pull/2105
4 changed files with 18 additions and 0 deletions
|
@ -23,6 +23,10 @@ try {
|
|||
assert((x /= 2) === 3);
|
||||
assert(x === 3);
|
||||
|
||||
x = 6;
|
||||
assert((x %= 4) === 2);
|
||||
assert(x === 2);
|
||||
|
||||
x = 2;
|
||||
assert((x **= 3) === 8);
|
||||
assert(x === 8);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue