The while statement creates a loop that executes a code block so long as a condition evaluates to true. The condition is evaluated before executing any statements within a code block.


    while (condition) {


condition A conditional expression evaluated before each iteration of the while loop. If this condition evaluates to true the statement within the code block is executed.
statement One or more statements executed as long as the condition evaluates to true. The code block must be enclosed with curly braces ({ ... }).

Try it out

The following example demonstrates how the while statement may be distributed across two <?ev..?> script blocks. 

    var i=0;
    while(i++ < 5){
    <p>Hello {{ i }}</p>
<?ev } ?>
COVID-19 NOTICE – Business as Usual
Evance continues to provide all services and support throughout this difficult period. See our full statement here