I have try three way in the bellow, the result is comment on the right,the diffcult is I can't different it from Object
datatype.How can I get it datatype like Array
or String
but not Object
?
var arr = [];
console.log('type of arr', typeof arr); //objct
console.log('instanceof array', arr instanceof Array); //true
console.log('instanceof object', arr instanceof Object); // true