1、toString(推荐)
const obj = {};
Object.prototype.toString.call(obj) === '[object Object]'
2、constructor
const obj = {};
obj.constructor === Object
3、instanceof
需要注意的是由于数组也是对象
const obj = {}
obj instanceof Object //true
const arr = []
arr instanceof Object //true
4、typeof
不推荐,null 和数组 也是 Object
const obj = {};
type of obj === Object
type of null ==== Object
type of [] ==== Object