What is the difference between a class's prototype object and it's
instance properties?

class A {
  var x : uint = 10; // instance property.
  prototype var x : uint = 20; // another instance property in the
prototype chain.
}

class B extends A { }

My understanding is that the result would be:

new B().x; // result is 20.

What would be the benefit of a class having a prototype over 9instance
properties/methods?
_______________________________________________
Es4-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es4-discuss

Reply via email to