typeof 为什么判断null是对象类型?instanceof判断的原理是什么?

JS的数据类型有七种 原始类型: Boolean Number String undefined null Symbol 对象类型 Object 用typeof判断类型 会出现下面的问题 typeof null // Object typeof判断其他的原始类型不会出现问题。 typeof 22 // 'number' typeof 'lorry' // 'string' typeof undef
相关文章
相关标签/搜索