First, the three main characteristics of object-oriented reply: encapsulation: Masking internal details, calling external interface to implement corresponding function (function call) Inheritance: Subclass inherits attributes and methods in parent class polymorphism (no polymorphic concept in JS) Ii. inheritance suggestion reply: Inherit: Subclass inherits properties and methods from parent class, these properties and methods do not need to implement the kind of process inheritance in subclasses: Single inheritance: A subclass has only one parent class multiple inheritance: One subclass can have multiple parent classes III. inheritance and implementation process suggestions reply: 1. Inheritance by changing the execution environment of the constructor (parent class)---in the subclass Add a special attribute that points to the parent class
JS common knowledge points 3. Object-oriented inheritance, design patterns