I. Object-oriented technology in JavaScript (solving how to use the fatigue in JS programming)
1. Examples of collection classes
The collection represents a non-repeating unordered collection. Two basic methods: A. Add to Collection B. Whether in the collection.
Reference: p218 set.js
2. Enumeration examples
Enumeration represents a limited set of values.
Examples of Poker
Two. Standard conversion method
1. toString (); Tolocalstring ();
2. ValueOf ();
3. ToJSON (); When an object is serialized, it ignores the prototype and constructor of the object.
Note: json.stringify (); Converts an object to a string format;
Json. Parse (); The object is changed to a pure object, there is no method;
4.
Three. Comparison method
1. Constructor = = constructor? elements = = elements?
p225
201507020721_ JavaScript authoritative Guide (sixth edition)--oo: Collection class and enumeration class, standard conversion method (p217-225)