Learn JavaScript
Advanced Array Methods
31.4
Lesson

includes()

The includes() method searches for an element in the array. If the element is present in the array, it returns true.

If the element is not present in the array, includes() returns false.