js中判断变量类型函数typeof的用法总结
1、作用:typeof 运算符返回一个用来表示表达式的数据类型的字符串。 可能的字符串有:"number"、"string"、"boolean"、"object"、"function" 和 "undefined"。 2、常用返回值说明表达式返回值typeof undefined"undefined"typeof null"object"typeof true"boolean"typeof 123"number"typeof "abc""string"typ...