比较运算
2015-07-31 16:46
435 查看
1
undefined>-1
一个是数值
先转化另一个为数,后台调用Number()方法
2
任何数值和NaN比较,false
null,undefined
3
typeof返回"字符串"!!
4
蛋疼的IE
undefined>-1
一个是数值
先转化另一个为数,后台调用Number()方法
Number(undefined);//NaN
2
任何数值和NaN比较,false
null,undefined
null==undefined; //true null!=undefined; //false null==0; //false undefined==0;//false
3
typeof返回"字符串"!!
4
蛋疼的IE
function f(a,b){var i=a;}; console.log(typeof f);//function console.log(typeof ActiveXObject);//undefined var xmldom=new ActiveXObject('MSXML2.DOMDocument.6.0'); console.log(typeof xmldom);//object
相关文章推荐
- haar_adaboost_cascade阅读资料
- ODAC访问oracle时,提示:由于以前的函数求值超时,函数求值被禁用,必须继续执行才能正常返回
- 20150727 Javascript进阶学习笔记(上)
- ASP.NET的简单认识
- 删除目录
- 食物链(带权并查集)
- itoo3.1新开始,新起点......
- webView导入html5(滴滴打车)
- [LeetCode]238.Product of Array Except Self
- HTTP协议
- HTML总结
- Yii 集成 PHPExcel读取Excel文件
- DES3加密解密类
- OC之给NSString增加分类(分类的特点)
- hdu4003Find Metal Mineral 树形dp+分组背包
- mobile web开发 图片展示控件PhotoSwipe android手势放大功能
- python range()函数
- Atom飞行手册翻译: 2.5 查找和替换
- 将多个字符串高亮显示之TTTAttributedLabel
- 20150727 JavaScript入门学习笔记