411 REFERENCE · Wikibooks
The Science of Programming/SwayPresentations/Objects/ClassAndObjectComponents3
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
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?
Previous
Next
Top