1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 22:48:11 +00:00

LibJS: Allow "for" statement without curly braces around body

This commit is contained in:
Andreas Kling 2020-04-04 21:09:06 +02:00
parent 42f47da75d
commit 9c8363bb5f
2 changed files with 15 additions and 1 deletions

View file

@ -0,0 +1,14 @@
function assert(x) { if (!x) throw 1; }
try {
var number = 0;
for (var i = 0; i < 3; ++i)
for (var j = 0; j < 3; ++j)
number++;
assert(number === 9);
console.log("PASS");
} catch (e) {
console.log("FAIL: " + e);
}