You don't tell the engine what type of data a variable holds, it figures it out while your code is running
- Variables can hold different types of values because it's all figured out during execution
A type of data that represents a single value. That is, not a object
JavaScript 有六種純值(Primitive Type)的型別。
Undefined
Null
Boolean
Number
String
Symbol
A special function that is syntactically (written) differently
Generally, operators take two parameters and return one result.
運算子都是函數
Which operator function gets called first
Functions are called in order of precedence (HIGHER precedence wins)
What order operator functions get called in: left-to-right or right-to-left
When functions have the same precedence
Converting a value from one type to another
This happens quite often in Javascript because it's dynamically typed.
應該永遠使用 ===
來比較是否相同,除非特殊情況
WierdJavascript