English
Range
About 53 wordsLess than 1 minute
2026-01-09
While for loops are not supported in custom functions, you can use Range to implement loop logic.
Definition:
Range range = Ranges.of(Integer start,Integer end)
range.each{
}Note: Maximum 500 iterations allowed.
Example:
Range range = Ranges.of(1,5)
range.each{ it ->
log.info(it)
}
//[1,2,3,4,5]