for | step |
Pas2JS pascal source code
var i: Integer; for i := 1 to 5 step 3 do WriteLn(i); for i := 5 downto 1 step 3 do WriteLn(i); try var s := -1; for i := 1 to 5 step s do WriteLn(i); except on E: Exception do WriteLn(E.Message); end; {<<< RESULT - CONSOLE LOG >>> ----------------------------- 1 4 5 2 FOR loop STEP should be strictly positive: -1 [line: 11, column: 4] ----------------------------- {<<<<<<<<< THE END >>>>>>>>>}