arr instanceof Array;//true为数组
伪数组
其实是Object对象
具有length属性
具有数值下标属性
没有数组特别的方法:forEach(),push()
varweiArr={}
weiArr.length=0;
weiArr[0]=‘atguigu‘;
weiArr.length=1;
console.log(weiArr instanceof Array);//false本文出自 “Rcid” 博客,请务必保留此出处http://13419255.blog.51cto.com/13409255/1975774
原文:http://13419255.blog.51cto.com/13409255/1975774