一.getTag函数解析
(1) 知识点一
Object.protype.toString()
// 所有继承Object.protype对象,(null,undefined)除外都继承toString// 会根据对象的[[class]]内部属性,返回由'[object 和 class ]' 组成的字符串ps [[class]]是个啥 字面理解就是toString(xx) 这个xx类
(2)知识点二
value == null
// 这里为什么不写 value === null
ps 写value === null 那么undefined 不会触发这个判断,还要多写一个判断
ps 如果写value == null undefined 和 null 都会触发这个判断并且 undefined == null == true
因为undefined是null派生