Chinaunix首页 | 论坛 | 博客
  • 博客访问: 334232
  • 博文数量: 80
  • 博客积分: 711
  • 博客等级: 上士
  • 技术积分: 733
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-23 15:43
文章分类

全部博文(80)

文章存档

2015年(9)

2014年(14)

2013年(33)

2012年(24)

我的朋友

分类: JavaScript

2013-05-16 18:18:51

typeof(1): number
typeof(NaN): number
typeof(Number.MIN_VALUE): number
typeof(Infinity): number
typeof("123"): string
typeof(true): boolean
typeof(window): object
typeof(Array()): object
typeof(function(){}): function
typeof(document): object
typeof(null): object
typeof(eval): function
typeof(Date): function
typeof(sss): undefined
typeof(undefined): undefined

所有的对象都被当作 true。
当且仅当字符串为空时,该字符串被当false。
null 和 undefined 被当作 false。
当且仅当数字为零时,该数字被当作 false。
阅读(414) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~