ES6 (class)

class concept

1. Basic Definition

2. Inheritance

 

How does inheritance pass parameters? (super)

When you define your own properties, you must call this after super (in the inheritance relationship, if the constructor of the subclass uses super to pass parameters, super must be placed in the first line of the constructor)

If there are parameters, it will be overwritten

3.getter 和 setter

 

 

assignment operation

4. Static methods

(invoked by the class, not an instance of the class)

5. Static properties (no keywords yet)

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325128615&siteId=291194637