{"json_modified": "2016-03-28T08:31:13.945398", "uuid": "c5212fd1-d6e8-4389-b8fe-1b7ecd12a3a1", "title": "Classes and Inheritance", "url": "/en-US/docs/Mozilla/Add-ons/SDK/Guides/Contributor_s_Guide/Classes_and_Inheritance", "tags": ["Add-on SDK"], "translations": [], "modified": "2016-01-15T09:51:58", "label": "Classes and Inheritance", "localization_tags": [], "locale": "en-US", "id": 86031, "last_edit": "2016-01-15T09:51:56", "summary": "A class is a blueprint from which individual objects are created. These individual objects are the instances of the class. Each class defines one or more members, which are initialized to a given value when the class is instantiated. Data members are properties that allow each instance to have their own state, whereas member functions are properties that allow instances to have behavior. Inheritance allows classes to inherit state and behavior from an existing classes, known as the base class. Unlike languages like C++ and Java, JavaScript does not have native support for classical inheritance. Instead, it uses something called prototypal inheritance. As it turns out, it is possible to emulate classical inheritance using prototypal inheritance, but not without writing a significant amount of boilerplate code.", "sections": [{"id": "Quick_Links", "title": null}, {"id": "Constructors", "title": "Constructors"}, {"id": "Prototypes", "title": "Prototypes"}, {"id": "Inheritance_and_Constructors", "title": "Inheritance and Constructors"}, {"id": "Inheritance_and_Prototypes", "title": "Inheritance and Prototypes"}, {"id": "Inheritance_and_Instanceof", "title": "Inheritance and Instanceof"}, {"id": "Overriding_Methods", "title": "Overriding Methods"}, {"id": "Classes_in_the_Add-on_SDK", "title": "Classes in the Add-on SDK"}], "slug": "Mozilla/Add-ons/SDK/Guides/Contributor_s_Guide/Classes_and_Inheritance", "review_tags": []}