compareArrays Function
Compare two arrays of the same type T using the specified compare function to compare each pair of array elements.
compareArrays<T>(lhs: ReadonlyArray<T>, rhs: ReadonlyArray<T>, compare: (a: T, b: T) => number): number
@returns 0 if the arrays have the same length and compare returns 0 for each pair of elements, or a non-zero value if the arrays differ in length or contents.
| Parameter | Type | Description |
|---|---|---|
| lhs | ReadonlyArray<T> | |
| rhs | ReadonlyArray<T> | |
| compare | (a: T, b: T) => number |
Returns - number
0 if the arrays have the same length and compare returns 0 for each pair of elements, or a non-zero value if the arrays differ in length or contents.
Defined in
- core/bentley/src/Compare.ts Line 156
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.