Add 'continue' command for loops. Also enhance for() unit tests which are now breaking and need to be fixed
This commit is contained in:
14
unittests/continue_while.chai
Normal file
14
unittests/continue_while.chai
Normal file
@@ -0,0 +1,14 @@
|
||||
var i = 0
|
||||
var j = 0
|
||||
|
||||
while (i < 10) {
|
||||
if (++i > 5)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
j = i;
|
||||
}
|
||||
|
||||
assert_equal(10, i);
|
||||
assert_equal(5, j);
|
Reference in New Issue
Block a user