null 和 undefined的区别

null: 没有对象,转化为数字时为0。

undefined: 有对象,还没初始化,转化为数字是NaN。

posted @ 2016-04-13 22:40  kakaguo  阅读(142)  评论(0编辑  收藏  举报