SKIPWHILE function

Synopsis
This function trims elements at the beginning of the source array until it finds an element that does not meet a specified condition. It then returns the rest of the array.
Variations
SKIPWHILE(SourceArray, Condition)
Returns a copy of the source array with the beginning trimmed.
Parameters
SourceArray

Specifies the array to work with.

Supported types: Numeric array; String array; Boolean array; Point array; Object array.
Condition

Specifies the condition to evaluate whether or not an element should be skipped.

Supported types: Boolean.
Returns
Returned types: Numeric array; Boolean array; String array; Point array; Object array.
Examples
1.

The following example skips the elements at the beginning of the source array until a positive value is found. The function returns the remaining elements [1, 4, -15, 13].

SKIPWHILE([-9, -52, -20, -15, -4, 1, 4, -15, 13], Item < 0)
SKIPWHILE(SourceArray, Condition, MaxCount)
Returns a copy of the source array up to a maximum size after it is trimmed.
Parameters
SourceArray

Specifies the array to work with.

Supported types: Numeric array; String array; Boolean array; Point array; Object array.
Condition

Specifies the condition to evaluate whether or not an element should be skipped.

Supported types: Boolean.
MaxCount

Specifies the maximum number of elements to return after trimming the source array.

Supported types: Numeric.
Returns
Returned types: Numeric array; Boolean array; String array; Point array; Object array.
Examples
1.

The following example skips the elements at the beginning of the source array until a positive value is found. The resulting array contains the remaining elements of the source array, up to the maximum allowed size. The function returns [1, 2, 3, 4].

SKIPWHILE([-9, -52, -20, -15, -4, 1, 2, 3, 4, 5, 6, 7], Item < 0, 4)