Skip to main content

includes(arr: ArrayLike, element: any, fromIndex?: number): boolean

A non-spec compliant utility function to check if an Array includes something.

remarks

Parameters:#

NameTypeDefault valueDescription
arrArrayLike-The array-like input to iterate through.
elementany-The item to search for in the array.
fromIndexnumber0The index of the array to start searching from.

Returns: boolean

boolean - true if the element was found in the array.

Defined in: unsafe/array/includes.ts:15