Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if array javascript

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: #check #array #javascript
ADD COMMENT
Topic
Name
9+6 =