Answers for "Check if list contains element js"

3

javascript check if in array

var extensions = ["image/jpeg","image/png","image/gif"];          
if(extensions.indexOf("myfiletype") === -1){
	alert("Image must be .png, .jpg or .gif");
}
Posted by: Guest on January-13-2020
0

Check if list contains element js

fruits.includes("Mango")   // Returns true
Posted by: Guest on September-21-2021

Code answers related to "Check if list contains element js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language