Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if is array js

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 #js
ADD COMMENT
Topic
Name
4+8 =