Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if a variable is array in javascript

// inside if else check
if(Array.isArray(myVarToTest)) {
	// myVatToTest is an array
} else {
	// myVarToTest is not an array
}
 
PREVIOUS NEXT
Tagged: #check #variable #array #javascript
ADD COMMENT
Topic
Name
7+7 =