Hướng dẫn extend trong javascript
The DescriptionThe Any constructor that can be called with
The
Note: You would rarely worry about this in practice, because a non-object
The right-hand side of
This is often useful to create mixins. While the base class may return anything from its constructor, the derived class must return an object or
ExamplesUsing extends The first example creates a class called
Using extends with built-in objects This example extends the built-in
Specifications
Browser compatibilityBCD tables only load in the browser See also |