extends jas code example
Example 1: extends in js
The extends keyword is used to create a child class of another class (parent).
The child class inherits all the methods from another class. Inheritance is
useful for code reusability: reuse properties and methods of an existing class
when you create a new class.
Example 2: extends javascript
The extends keyword is used to create a child class of another class (parent). The child class inherits all the methods from another class. Inheritance is useful for code reusability: reuse properties and methods of an existing class when you create a new class.