BigInt64Array.prototype.indexOf

Returns the index of the first occurrence of a value in a typed array, or -1 if it is not present.

Syntax

indexOf(value, fromIndex?);

Parameters

Example

new BigInt64Array([23, 42, 108]).indexOf(42)
1
new BigInt64Array([23, 42, 108]).indexOf(88)
-1

Return value

An index or -1 if the element was not found.

See also