arrayIter
arrayIter(array array, function callback)
Calls the callback function for each element of the array. If the callback function takes one parameter, the source array's value is sent; if it takes two parameters, the first is the key and the second is the value.
Calls the callback function for each element of the source array array.
The callback function takes 1 to 3 parameters, in this order: (value, position, source array).
Parameters
- array: Source array.
- callback: Function called for each element.
Return
No return value
Notes
- In LeekScript <= 3, if the callback function takes one parameter, the value from the source array is sent; if it takes two parameters, the key and the value are sent.