Array.find_last

Array.find_last

Array.find_last

Function

Returns the first element from right to left for which the callback result is true.

Syntax

Parameters

ParametersTypeRequiredDefault valueDescription
callbackFnNoEmptyThe callback signature is fn(value, index, current).

Return value

TypeDescription
Any/EmptyReturns the element if found; returns Empty if not found.

Example

Notes

  • Search from right to left.