Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

The Science of Programming/SwayPresentations/Objects/ExtensionInheritance

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

Extension Inheritance Extension inheritance: whereby the subclass adds features not found in the superclass. function super(a) { var b = a + 1 * (a - 1); this; } function sub() { var c = 3; extends(super(c * c)); } Now we make a sub object: var s = sub(); inspect(s . b); The output is: s . b is 80 Next Previous Top