1.

Explain nested promises JavaScript?

Answer»

The concept of Sub-classes and inheritance is like that in other languages like Java and C++. The sub-class can inherit properties from its parent class and can also override or update an existing method.

Let’s consider the below example. We have a Parent class “Mammal” and a Sub-class “Bat” which is inheriting from it. Notice, that we have use the “EXTENDS” keyword.
To  use the “legs” and “NAME” variable in “Bat”, we use the “super()” method. Also, notice that we can use update “walk()”, and ADD additional FUNCTIONALITIES.



Discussion

No Comment Found