array includes pattern code example
Example 1: javascript includes
const pets = ['cat', 'dog', 'bat'];
console.log(pets.includes('cat'));
// output: true
Example 2: js array contains
let fruits = ["Banana", "Orange", "Apple", "Mango"];
let do_contain = fruits.includes("Mango"); // contain: true