Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

array value check javascript

const names = ["code","codepadding"]
const key = "codepadding";
var have = names.includes(key) // return true / false
if(have){
	//	do something
}
 
PREVIOUS NEXT
Tagged: #array #check #javascript
ADD COMMENT
Topic
Name
5+2 =