Example code:
Ex. 1:
// var a = [1,2,3,4,5];
a.includes(3); // true
a.includes(6); // false
Ex.2:
//Array includes() method
//check to see if something is inside an array
let colors = [ 'red', 'blue', 'yellow'];
['red', 'blue', 'yellow'] .includes(blue); // true
['red', 'blue', 'yellow'] .includes(purple); // false
['red', 'blue', 'yellow'] .includes(blue, pink); // false
['red', 'blue', 'yellow'] .includes(red, blue); // true
['red', 'blue', 'black'] .includes(black); // true
arr.includes(searchElement)
arr.includes(searchElement, fromIndex)
searchElement --> is the element to search for
fromIndex --> is the position in the array where to begin the search for the searchElement. The default position system starts at 0
The return value is called a Boolean -- a.k.a. true or false
--> What is an Array or String?