一. typeof
typeof null === "object"历史遗留bug
new Boolean(), new Number(), new String()用typeof检测为object
二.instanceof
用于检测构造函数prototype属性是否出现在某个实例对象的原型链上
同时属于多个类型new String()同时属于String和Object类型
typeof null === "object"历史遗留bug
new Boolean(), new Number(), new String()用typeof检测为object
用于检测构造函数prototype属性是否出现在某个实例对象的原型链上
同时属于多个类型new String()同时属于String和Object类型