typeof()返回值

typeof()返回值

typeof(的)运算数未定义,返回(的)就是 "undefined". 
运算数为数字 typeof(x) = "number" 
字符串 typeof(x) = "string" 
布尔值 typeof(x) = "boolean" 
对象,数组和null typeof(x) = "object" 
函数 typeof(x) = "function" 
typeof 运算符返回一个用来表示表达式(的)数据类型(的)字符串。 
可能(的)字符串有:"number"、"string"、"boolean"、"object"、"function" 和 "undefined"。 

posted @ 2017-06-23 10:45  财哥说  阅读(1349)  评论(0编辑  收藏  举报