Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check typeof array

Array.isArray(arr)

// Examples
Array.isArray([1, 2, 3]);  // true
Array.isArray('foobar');   // false for strings
Array.isArray({foo: 123}); // false for objects
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #javascript #check #typeof #array
ADD COMMENT
Topic
Name
5+4 =