Answers for "isarray"

22

if object is array javascript

Array.isArray(object);
Posted by: Guest on April-08-2020
8

javascript check if is array

var colors=["red","green","blue"];

if(Array.isArray(colors)){
    //colors is an array
}
Posted by: Guest on July-22-2019
1

isarray

Array.isArray([1, 2, 3]);  // true
Array.isArray({foo: 123}); // false
Array.isArray('foobar');   // false
Array.isArray(undefined);  // false
Posted by: Guest on June-26-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language