indexOf()
Gets the index of a specified target value in a string, array or an object. Unlike Array.prototype.indexOf()
, this function works for finding NaN
and differentiates between -0
and 0
.
target
should be searched for.subject
.subject
is an array or a string this will be a integer representing the first position at which target
is found within subject
or this will be -1
which represents that target
was not found. If subject
is an object this will be key at which target
was first found (based on Object.keys()
) or undefined
if target
was not found.This function directly requires the following function which is included automatically:
typeOf()
This function is directly required by the following functions:
ifIs()
includes()
target
is present within a given string, array or object. Unlike Array.prototype.includes()
, this function differentiates between -0
and 0
.
isKind()
keys()
uneval()