The JavaScript Programming Language(1)
http://video.yahoo.com/watch/111593/1710507
1. NaN : not a number , 不等于任何东西包括自己 , 算数运算中有 NaN 结果是 NaN
2. Number(value) 失败则返回 NaN
3.Math Object 内置对象
4.String usc-2 不是 utf-8 比标准出来早 ,没有 character type 只有长度为1的字符串
5 String(value) 返回 String
6.Boolean(value) == !!value
7. falsey value : null undefined ""(空字符串) 0 NaN ,其余都是 truthy valus
8.every thing is object
9.Object:container of name-value pair name cannot be undefined
10. 函数可以作为javascript的值
11.Jscript 和 Javascript 只是名字不同,其他都一样
12.+ 的作用
12.1. 全是数字 ,功能算术运算
12.2 否则 转化为 string ,concat
12.3 +"42"=42 == Number("42") == parseInt("42")== parseInt("42",10)
12.4 +"2" +(+"1") = 3
13. == != 涉及类型转换
=== !== 不涉及类型转换
14. if(a) return a.member;
== return a&&a.member;
15. & ! ^ >> >>> << 首先转换成32为整数运算然后再把结果转换成Double ,和其他语言相比,效率低下,不建议使用
本文深入讲解了JavaScript的基础知识,包括特殊值NaN的概念及其运算特点、数值与字符串类型的转换方法、Math对象的应用、基本数据类型的真假值判断原则以及位运算符的使用注意事项。
148

被折叠的 条评论
为什么被折叠?



