这个undefined要如何理解
这个undefined要怎么理解?JScript codevar aalert(typeof typeof a)a的值为undefinedtypeof a返回undefi
这个undefined要怎么理解?
JScript codevar a;alert(typeof typeof a);
a的值为undefined
typeof a返回undefined (也就是说typeof undefined返回undefined)
但是再次typeof这个undefined结果就变成了string了~
[解决办法]undefined 相当于java 的NULL
[解决办法]参考:http://www.cnblogs.com/qiantuwuliang/archive/2010/01/12/1645302.html
[解决办法]参考:ECMAScript 原始类型,对Undefined类型讲得非常透彻。
[解决办法]var a;
alert(typeof typeof a);
typeof a 输出的是 'undefined',再 typeof 'undefined' 就是 string
[解决办法][解决办法][解决办法][解决办法]