Last modified on 28 October 2010, at 23:10

The Science of Programming/SwayPresentations/Objects/ClassAndObjectComponents3

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