Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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");
} 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #check #array
ADD COMMENT
Topic
Name
5+9 =