The Array#includes() method is used to determine whether an array includes a particular value among its entries by returning either true or false. Let's see an example to find an element(numeric and string) within an array.
Array#includes()
var numericArray = [1, 2, 3, 4]; console.log(numericArray.includes(3)); // true var stringArray = ["green", "yellow", "blue"]; console.log(stringArray.includes("blue")); //true