February 2018
Intermediate to advanced
298 pages
8h 22m
English
The includes() method returns true if a certain supplied element exists in an array, and returns false if it doesn't exist in that array.
This is simple enough to understand with just an example:
const arr = [0, 1, 1, 2, 3, 5, 8, 13];arr.includes(0); // truearr.includes(13); // truearr.includes(21); // false
Read now
Unlock full access