Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

if is 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: #array #javascript
ADD COMMENT
Topic
Name
2+6 =