Loops group a section of instructions and loops them. Jam has three kinds of loops. A generic loops without a condition, a while loop with a simple condition and a for loop for interaction.
While inside of a loop, the break and next statements can be used to control the behaviour of the loop.
Break ::= "break" Next ::= "next" LoopInstruction ::=Instruction|Break|NextLoopInstructionSet ::= (LoopInstruction\n )* Loop ::=GenericLoop|WhileLoop|ForLoopGenericLoop ::= "loop"LoopInstructionSet"end" WhileLoop ::= "while"ValueLoopInstructionSet"end"