Methods

eachΒΆ

each(arr:Arr, cb:Fun)

Iterates over the elements of arr, passing each in turn to cb along with args: cb(ITEM)
Source: stdlib.ngs:1054

cb

Function to be called with values from arr

Returns

arr

Example

s=0
[1,2,3].each(F(i) { global s; s+=i })
echo(s)  # Outputs: 6