Prototype Includes
JavaScript Array.prototype.includes
ECMAScript 2016 introduced Array.prototype.includes
to arrays. This allows us to check if an element is present in an array:
Example
const fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.includes("Mango"); // is true
Backlinks