Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js test if array

if(Array.isArray(myVarToTest)) {
	// myVatToTest is an array
} else {
	// myVarToTest is not an array
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #test #array
ADD COMMENT
Topic
Name
5+2 =