Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript get 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 #typeof #array
ADD COMMENT
Topic
Name
8+7 =