判断方法 typeof
typeof 可以用来区分除了 null 类型以外的原始数据类型,对象类型的可以从普通对象里面 识别出函数:
typeof undefined // "undefined"
typeof null // "object"
typeof 1 // "number"
typeof "1" // "string"
typeof Symbol() // "symbol"
typeof function() {} // "function"
typeof {} // "object"