1.

The meaning for Augmenting classes is that ___________(a) objects inherit prototype properties even in a dynamic state(b) objects inherit prototype properties only in a dynamic state(c) objects inherit prototype properties in the static state(d) object doesn’t inherit prototype properties in the static stateThe question was posed to me in an online quiz.The question is from Classes in JavaScript in portion Classes and Modules in JavaScript of JavaScript

Answer»

The CORRECT choice is (a) objects inherit prototype properties even in a dynamic state

To EXPLAIN: JavaScript’s prototype-based inheritance mechanism is dynamic an object inherits properties from its prototype, even if the prototype CHANGES after the object is created. This means that we can augment JavaScript CLASSES simply by adding NEW methods to their prototype objects.



Discussion

No Comment Found

Related InterviewSolutions