Function findPreviousEntryAndIndexWithValue
- findPreviousEntryAndIndexWithValue(
arr: NumericArrayWithNull,
currentIndex: number,
): (number | null)[]Parameters
- arr: NumericArrayWithNull
The array to search through
- currentIndex: number
The index to start searching from
Returns (number | null)[]
[index, value] A tuple containing the index of the previous entry and its value, or null if not found
- arr: NumericArrayWithNull
Was this helpful?
Looks back in an array for the previous entry that is not null.