3中判断类型的方法

 

typeof  不能判断 arr  undefined  null ...

 

1.arr.constructor==Array

2.arr instanceof Array

3.Object.prototype.toString.call(arr)=='[object Array]'

posted @ 2015-09-07 19:19  zhengyan_web  阅读(133)  评论(0编辑  收藏  举报