javascript array contains

JavaScript
var colors = ["red", "blue", "green"];
var hasRed = colors.includes("red"); //true
var hasYellow = colors.includes("yellow"); //falsevar fruits = ["Banana", "Orange", "Apple", "Mango"];
var n = fruits.includes("Mango");
 
Source

Also in JavaScript: