The collection to inspect.
The value to search for.
Optional
fromIndex: numberThe index to search from.
@param- {Object} [guard] Enables use as an iteratee for methods like reduce
.
Optional
guard: anyReturns true
if value
is found, else false
.
Checks if
value
is incollection
. Ifcollection
is a string, it's checked for a substring ofvalue
, otherwiseSameValueZero
is used for equality comparisons. IffromIndex
is negative, it's used as the offset from the end ofcollection
.Since
5.12.0
Example