连个结果都是undefinde,为什么返回false?
var x;
alert(typeof x===x);//false
怎么理解undefined啊?
[解决办法]
http://www.w3school.com.cn/js/pro_js_primitivetypes.asp
[解决办法]
typeof(typeof x) //string
typeof x // undefined
所以.....
[解决办法]
- JScript code
var x;var y=typeof x;//y是一个字符串,值为'undefined'alert(x===y);alert(x===undefined);alert(y==='undefined');
[解决办法]