首页 > 其他 > 详细

undefined null ""

时间:2016-03-06 23:50:31      阅读:149      评论:0      收藏:0      [点我收藏+]

console.log(a)//报错  Uncaught ReferenceError: conaole is not defined(…) 

var a;console.log(a)//不报错 输出undefined

区别:

undefined  var a;只定义,没有赋值

null      不存在 

""       var a="";浏览器中a赋值为“”

undefined null ""

原文:http://warmdoll.blog.51cto.com/10881334/1748154

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!