Float64Array.prototype.find

Returns the value of the first element in the typed array where predicate is true, and undefined otherwise.

Syntax

find(predicate, thisArg?)

Parameters

Return value

An array element or undefined.

Example

new Float64Array([1, 2, 3, 4, 5]).find(x => x > 2)
3