大概总结这些 如果还有其他的 再总结叭
数组 | 对象 |
---|---|
Array.isArray | typeof obj |
arr instanceof Array | obj instanceof Object |
arr.constructor === Array | obj.constructor === Object |
Object.prototype.toString,call(arr) | Object.prototype.toString.call(obj) |
大概总结这些 如果还有其他的 再总结叭
数组 | 对象 |
---|---|
Array.isArray | typeof obj |
arr instanceof Array | obj instanceof Object |
arr.constructor === Array | obj.constructor === Object |
Object.prototype.toString,call(arr) | Object.prototype.toString.call(obj) |