1var colors = ["red", "blue", "green"];
2var hasRed = colors.includes("red"); //true
3var hasYellow = colors.includes("yellow"); //false
1
2var fruits = ["Banana", "Orange", "Apple", "Mango"];
3var n = fruits.includes("Mango");
4
1const list = [1, 2, 3, 4, 5, 5, 23, 21, 1231, 2434, 443546456, 17];
2console.log(list.includes(4));
3// --> true