Answer Posted / prabhukalyan dash
Inheritence is the process by which one class can acquired
the proporties of other.and it is used for Reusability i.e
can add more functionality.
Base class is the existing class where as the class which
inherits from the base class is known as Derived class.
If there is a class A and Class B then class B can inherit
the features of Class A as shown below
Class B extends A
{
// you will get all functions or variables from A
except private variables.
// apart from existing functions you can add new functions
}
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How do browsers work?
Is everything in javascript asynchronous?
Can I write javascript in notepad?
Explain few difference between null, undefined or undeclared javascript variable?
What javascript method would convert the string “20” to an integer (on the fly) so “20” + 20 = 40?
Describe the properties of an anonymous function in JavaScript?
What is the most widely used programming language?
What are the primitive data types in JavaScript?
What is the benefit of arrow functions?
What is the difference between undefined value and null value?
What is the difference of "settimeout" function and setinterval functions in javascript
Explain the different types of pop-up boxes you can create in JavaScript.
Explain the for-in loop?
How to define a named function in JavScript?
How to set the focus in an element using javascript?