NOTE: This invite-only release of SunSed Alpha is for testing purposes and in no way represents the final quality of the product — join the waitlist (~wait time: 2 weeks). SunSed release date is on March 11, 2022.


For is one the most versatile and most widely used looping mechanism across most programming languages.

FOR (initialize counter; evaluate counter; increase counter) {
    // code to execute for each iteration


FOR ($x = 0; $x < 10; $x++) {
    PRINT "X is " . $x . " which is less than 10"

Initialize counter statement of $x = 0; initializes the $x and sets the start value to 0. Evaluate counter statement of $x < 10; will check the validation of the expression and as long as the $x value is less than 10 will continue the loop. Increase counter statement of $x++; will increase $x by 1 after each iteration.

Copyright © SunSed LLC 2013-2021 All rights reserved.