JavaScript ----- 12. Objects

1. Object

Everything object, but the object must be a specific thing. For example: "star" is not an object, "Stephen Chow" is the object; "Apple" is not an object "apple" is the object. Js, the subject is a set of unordered attributes and methods associated group.
Properties and methods objects are composed of

  • Properties: properties of things, with the object properties are represented (common noun)
  • Method: Behavior of things, the subject method is represented by (common verb)

    2. three ways to create an object

    3. new keywords

    4. Loop object properties

Guess you like

Origin www.cnblogs.com/deer-cen/p/12041214.html