Iterative Instructions
Iterative instructions, or statements, are used to construct a loop that enables the repetition of a sequence of instructions, subject to some terminating condition.
Jade provides two repetition constructs that reflect the needs of loop construction and iterative access to collections. These repetition constructs are listed in the following table.
Instruction | Purpose |
---|---|
while | Constructs a loop subject to a terminating condition |
foreach | Accesses entries of a collection sequentially until a terminating condition is encountered |