mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:08:10 +00:00
LibJS: Add support for "continue" inside "for" statements :^)
This commit is contained in:
parent
e3b92caa6d
commit
9ebd066ac8
8 changed files with 65 additions and 1 deletions
14
Libraries/LibJS/Tests/continue-basic.js
Normal file
14
Libraries/LibJS/Tests/continue-basic.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
function assert(x) { if (!x) throw 1; }
|
||||
|
||||
try {
|
||||
var j = 0;
|
||||
for (var i = 0; i < 9; ++i) {
|
||||
if (i == 3)
|
||||
continue;
|
||||
++j;
|
||||
}
|
||||
assert(j == 8);
|
||||
console.log("PASS");
|
||||
} catch {
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue