LibJS: Add basic support for modulo (%) in binary expressions

This commit is contained in:
Andreas Kling 2020-04-04 21:17:34 +02:00
parent 9c8363bb5f
commit 644ff1bbfd
Notes: sideshowbarker 2024-07-19 07:56:02 +09:00
6 changed files with 25 additions and 0 deletions

View file

@ -0,0 +1,8 @@
function assert(x) { if (!x) throw 1; }
try {
assert(10 % 3 === 1);
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}