1、typeof(new Date() + new Date());

 

 

  • string


    "+"会转成字符串类型




2、typeof(new Date() - new Date());

 

  • number


   "-"会ToNumber



 

3、typeof(void null);

 

  • undefined

     


     void运算符对任何值都返回undefined.   



  


 

4、[].length = -2;

 

 

  • RangeRrror:invalid array length

     


     数组的length在0-2的32次方-1之间


     




扩展阅读:



1、关于typeof  http://zhangyaochun.iteye.com/blog/1480198



2、null与undefined  http://zhangyaochun.iteye.com/blog/1184375