Chapter 1-4
1. Variables
①, ECMAScript variables are loosely typed, meaning they can be used to hold any type of data. In other words, each variable is simply a placeholder for holding the value.
②, if you use var to define a variable in a function, the variable is destroyed after the function exits.
③, using typeof return for undefined and uninitialized variables is undefined
2. Data type
ECMAScript has 5 simple data types (base data types) Undefined Null Boolean number String and complex data type Object. Creating a custom type mechanism is not supported.
3. String
Features: Strings in ECMAScript are immutable, meaning that once strings are created, their values cannot be changed.
4, with (can not be used in strict mode, also does not recommend the use of more consumption of performance)
The function of the WITH statement is to set the scope of the code to a specific object.
5. Functions
Features: Named parameters are only convenient, but not necessary.
All parameter passes in ECMAScript are values and cannot pass arguments by reference.
parameter and function names cannot be eval and arguments in strict mode
6. Garbage Collection Strategy
Mark Clear
There is a circular reference to the reference count.
JavaScript Advanced Programming Notes