On Jan 15, 2012, at 8:10 AM, David Bruant wrote:
Hi,
I'm refering to Allen's writing at [1]:
The basic idea is that the properties prototype object are shared
parts of all of inheriting child object. Modifying such a shared part
by a child, introduces a local change that is visible to
Le 15/01/2012 20:21, Allen Wirfs-Brock a écrit :
On Jan 15, 2012, at 8:10 AM, David Bruant wrote:
Hi,
I'm refering to Allen's writing at [1]:
The basic idea is that the properties prototype object are shared
parts of all of inheriting child object. Modifying such a shared part
by a child,
Le 15/01/2012 21:23, David Bruant a écrit :
-
function C(){
this.length = 3;
}
function f(a,b){}
C.prototype = f;
var c = new C();
console.log(c.length);
-
For this code, ECMAScript 5 says:
When doing new C(), |this| is assigned C.prototype which is the
function f (it
Le 15/01/2012 21:23, David Bruant a écrit :
-
function C(){
this.length = 3;
}
function f(a,b){}
C.prototype = f;
var c = new C();
console.log(c.length);
-
For this code, ECMAScript 5 says:
When doing new C(), |this| is assigned C.prototype which is the
function f (it
4 matches
Mail list logo