-
Notifications
You must be signed in to change notification settings - Fork 8
扩展知识点
luics edited this page Nov 17, 2021
·
2 revisions
- Primitive types:
- undefined : typeof instance === "undefined"
- Boolean : typeof instance === "boolean"
- Number : typeof instance === "number"
- String : typeof instance === "string"
- BigInt : typeof instance === "bigint"
- Symbol : typeof instance === "symbol"
-
Object: typeof instance === "object"
- Function: typeof instance === "function"
- null : typeof instance === "object"
-
BigInt:
arbitrary precision
,2n ** 53n === 9007199254740992n
-
String:
immutable
, use it as 'textual-data-only' -
Symbol:
unique identifier
, Well-known Symbols(Symbol.hasInstance
,Symbol.iterator
) -
Object:
a collection of properties
-
key
is String or Symbol,value
can be any type -
data property
,accessor property
- hashmap ~= object
-
Function
,Array
are also objects
-
- Value Types and Reference Types,值类型和引用类型
-
Coercion: type convertion, too complex to avoid it!
3 * "3" = ?
-
==
or===
, always use===
-
1 == "1"
, true, perform type coercion -
1 === "1"
, false - Falsy Values: false, 0, "", null, undefined, NaN
-
-
CSS is NOT a programming language. CSS is what you use to selectively style HTML elements.
-
p{color:red;}
,This CSS selects paragraph text, setting the color to red
- 选择器(Selector),
p
- 规则(Decalration/Rule),
color: red;
- 属性(Property),或属性名,
color
- 属性值(Property value),
red
- 属性(Property),或属性名,
-
-
Cascade & Specificity & Inheritance,级联、优先级和继承,CSS最核心的概念
- 级联(Cascade):一个元素可以被多个选择器命中
- 优先级(Specificity):级联状态下,如何确定命中的规则
- 继承(Inheritance):无特定规则,跟着感觉走,如
color
可继承、width
不可继承
- Closure and Scope Chain,闭包和作用域链
- Inheritance and the prototype chain,JS继承和原型链
- Memory Management,内存管理
- EventLoop,并发模型和事件循环
- 《ES6入门教程》,书
- 《JavaScript 语言精粹》 ,by Douglas Crockford(“JSON 之父”)
- 《Learning Advanced JavaScript》 ,by John Resig(JQuery 作者)
- API手册
- 协议
- JS Standard, ECMAScript or ECMA-262
- CSS Standard
- HTML Standard