如何判断一个js对象是否是Array,

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

猜你喜欢

转载自www.cnblogs.com/whlBooK/p/12176503.html