javascript check if value in array

JavaScript
var fruits = ["Banana", "Orange", "Apple", "Mango"];

var n = fruits.includes("Mango");var fruits = ["Banana", "Orange", "Apple", "Mango"];
var n = fruits.includes("Mango");var myList=["a", "b", "c"];
mylist.includes("d")//returns true or falsevar fruits = ["Banana", "Orange", "Apple", "Mango"];

var n = fruits.includes("Mango");
 var fruits = ["Banana", "Orange", "Apple", "Mango"];
var n = fruits.includes("Mango");
 var extensions = ["image/jpeg","image/png","image/gif"];          
if(extensions.indexOf("myfiletype") === -1){
	alert("Image must be .png, .jpg or .gif");
} 
Source

Also in JavaScript: