FOREACH

FOREACH $$<itervar> in $<aryvar>({<startkey>})

     <statements>

NEXT $$<itervar>

 

FOREACH'REVERSE $$<itervar> in $<aryvar>()

     <statements>

NEXT $$<itervar>

 

The foreach and foreach'reverse loops are used to iterate through Ordered Maps, which see for details.