Array Class
Methods
iterate
-
array
-
startIndex
-
incrementBy
-
iterationFunction
-
contextObject
Parameters:
-
array
Arraythe array to iterate
-
startIndex
Number(Optional) The first index to iterate. If left undefined, iteration will either start at the beginning of the array if incrementBy is positive or at the end of the array if incrementBy is negative.
-
incrementBy
Numberthe interval by which the array will be iterated. Must be a non-zero integer. Negative values cause the array to be iterated backwards.
-
iterationFunction
Functionthe function to call on each iteration. This function will receive three arguments: value, index, and array. If this function returns a truthy value, iteration will be terminated.
-
contextObject
Object(Optional) the context that will become this in the iterationFunction
Returns:
unnest
-
array
-
levels
Utility function that flattens nested arrays. The original array is not modified. The returned array items are a shallow copy of the original array items.