Loop Status
A Loop status value can provide information of a loop in progress. Its primary use is in condition expressions within a loop.
Related commands
forEach
This command generates Loop status values when itsvarStatus
attribute is defined.repeat
This content command generates Loop status values when itsrepeat-var-status
secondary attribute is defined.
Methods
getCount() | Resolves into a Number telling the number of the current iteration within this loop. During the first iteration, the value is 1. For example, the expression Using the shorthand form, the expression becomes |
getIndex() | Resolves into a Number telling the index of the current iteration within this loop. During the first iteration, the value is 0. For example, the expression Using the shorthand form, the expression becomes |
isFirst() | Resolves into a Boolean telling whether the current iteration is the first iteration (true) of the loop or not (false). For example, the expression Using the shorthand form, the expression becomes |
isLast() | Resolves into a Boolean telling whether the current iteration is the last iteration (true) of the loop or not (false). For example, the expression Using the shorthand form, the expression becomes |