Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript check if is array

let names=['Jhon','David','Mark'];
console.log(Array.isArray(names));
// true

let user={id:1,name:'David'};
console.log(Array.isArray(user));
// false

let age 18;
console.log(Array.isArray(age));
// false
 
PREVIOUS NEXT
Tagged: #javascript #check #array
ADD COMMENT
Topic
Name
8+9 =