1.数组类型判断
let arr = [1,2,3]
方法一
typeof arr // 'object'
方法二
Array.isArray(arr) // true
方法三
arr instanceof Array // true
方法四
arr.constructor === Array // true
方法五
Object.prototype.toString.call(arr) === "[object Array]" // true
2.对象类型判断
let obj = {"name": "wxy"}
方法一
obj.constructor === Object // true
方法二
Object.prototype.toString.call(obj) === "[object Object]" // true