判断一个变量是否为数组对象 Always_positive 2021-04-08 73 阅读1分钟 代码 var a = []; console.log(a instanceof Array); 核心:使用instanceof而不是typeof