includes (obj) Boolean
public
Returns true
if the passed object can be found in the enumerable.
[1, 2, 3].includes(2); // true [1, 2, 3].includes(4); // false [1, 2, undefined].includes(undefined); // true [1, 2, null].includes(null); // true [1, 2, NaN].includes(NaN); // true
Parameters:
-
obj
Object
- The object to search for.
Returns:
-
Boolean
- `true` if object is found in the enumerable.
Please login to continue.