js list contains element code example
Example: javascript list has item
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.includes("Mango");
//true
var fruits = ["Banana", "Orange", "Apple", "Mango"];
fruits.includes("Mango");
//true