alert(typeof("aa")); string
alert(typeof(123)); number
alert(typeof(true)); boolean
alert(typeof(new Array())); object
alert(typeof(function(){})); function
alert(typeof(dd));---dd未定义 undefind
typeof 运算符返回一个用来表示表达式的数据类型的字符串。
可能的字符串有:"number"、"string"、"boolean"、"object"、"function" 和 "undefined"。