1. Direct Volume: the value of direct volume can be confirmed at the same time of declaration; undefined, true/false, String, value, regular expression, null
2. expression: the syntax structure of the result generated by operators and operators, which is unpredictable;
A statement is a sentence or command separated by ";". If a ";" is added after an expression, it indicates that "only an expression exists, statements without other syntax elements ";
Single-value expression: Expressions without operators are called Single-value expressions;
3. null is an empty object. You can use for in for enumeration, but the enumeration is not empty. Because it is not from the object () constructor (or subclass) instance, instanceof returns false;
4. {} is an empty object. It has all the features of the object and predefined attributes and methods, because it is an instance of the object () constructor (or subclass, therefore, instanceof returns true. You can use for in for enumeration. Some operations can enable empty objects to enumerate some attribute names.
5. the object has no prototype. Only the constructor has the prototype and attribute 'constructor. prototype' points to the prototype. The object only has the question of "constructing a prototype" and does not have the question of "Holding (or having) a prototype ".
6. A prototype is actually an object instance. An empty object is the basis of all objects. The object construction process can be simply mapped to an 'replicase' empty object. Javascript uses "copying member information to the instance image only when a member of an instance is written".
This means that all instances are directed to the prototype. When operating the instance, you can follow the pointer to find some properties and methods in the prototype. However, when a member of the instance is different, copy the member information to the instance image;
7. Object Construction Process:
A function has a prototype member, but it has no value at all during function initialization. The constructor features only when the prototype is referenced, in addition, the function prototype is always an instance of the standard and built-in object () constructor. However, after the instance is created, the constructor attribute is always assigned to the current function.
8. An object instance is essentially "A structure pointing to its prototype and holding an attribute list", all of which are inherited from object. prototype.
9. Basic Properties of the object prototype include:
Basic Properties of object prototype
| Member name |
Type |
Category |
| Tostring |
Function |
Dynamic Language |
| Tolocalestring |
Function |
| Valueof |
Function |
| Constructor |
Function |
Object System: Construction |
| Propertyisenumerable |
Function |
Object System: Properties |
| Hasownproperty |
Function |
| Isprototypeof |
Function |
Object System: Prototype |
Special Member of the constructor (function)
| Member name |
Type |
Functional Language |
| Call |
Function |
| Apply |
Function |
| Caller |
Function |
| Bind |
Function |
| Arguments |
Object |
Dynamic Language |
| Length |
Number |
| Prototype |
Object |
Object System: Prototype |
10. Each instance has a proto attribute. This attribute points to the prototype and is called the "Internal prototype chain". Therefore, an instance has two prototype chains.
11. For an instance generated by a constructor, its constructor attribute points to this constructor by default.