< The Science of Programming < SwayPresentations < Objects
Class and Object Components, continued
What about overriding simple variables?
function z()
{
var value = 3;
function getvalue() { value; }
this;
}
function x()
{
var value = 4;
extends(z());
}
var obj = x();
What should obj . getValue() produce?
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.