javascript中的一些偏门知识
undefined能够被重写
undefined = "now it's defined";
alert( undefined );
浏览器测试结果:
浏览器 |
测试结果 |
结论 |
ie |
now it's defined |
可以改变 |
firefox |
undefined |
不能改变 |
chrome |
now it's defined |
可以改变 |
opera |
now it's defined |
可以改变 |