typeof 返回变更类型,以字符串的形式展示。
Number(数字),
String(字符串),
Boolean(布尔),
Object(对象),null返回Object,
Function(函数),
Undefined(未定义)
typeof(a): undefined
typeof(undefined): undefined
typeof(NaN): number
typeof(111): number
typeof(Infinity): number
typeof(“123”): string
typeof(null): object
typeof(window): object
typeof(document): object
typeof(true): boolean
typeof(function(){}): function
typeof(object): function
typeof(eval): function
typeof(Date): function