document.write('

解析: typeof 可以用来检测给定变量的数据类型,可能的返回值:

(1) \'undefined\' ——这个值未定义。

(2)\'boolean\' ——这个值是布尔值。

(3)\'string\' ——这个值是字符串。

(4)\'number\' ——这个值是数值。

(5)\'object\' ——这个值是对象或 null。

(6)\'function\' ——这个值是函数。

• typeof("string") 返回类型就是 string 类型 ;

• typeof(new String("string")) 返回类型是 object。new String("string") 创建一 个 String 对象,其语法为 newString(stringValue),这个调用会将参数转换为字符 串,并作为一个 String 对象;

• typeof(Array) 返回类型是 object;

• typeof(new Array()) 返回类型是 object;

• typeof("s123") 返回类型是 string; • typeof("123s") 返回类型是 string。

');