Answers for "check if single item is in js array"

4

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

Code answers related to "check if single item is in js array"

Code answers related to "Javascript"

Browse Popular Code Answers by Language