If A is the superclass and B is the subclass, then subclass inheriting the superclass can be represented as _________

If A is the superclass and B is the subclass, then subclass inheriting the superclass can be represented as _________
A. B=inherit(A);
B. B=A.inherit();
C. B.prototype=inherit(A);
D. B.prototype=inherit(A.prototype);
 
Answer: c
Explanation: inherit() function is a predefined function in javascript which is used to inherit properties of another class. The subclass B inherits the prototype of the class A.
 

Tìm kiếm

Back
Top