You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
228 B
13 lines
228 B
13 years ago
|
var Foo = {
|
||
|
value : function() { return this.x + this.y; }
|
||
|
};
|
||
|
|
||
|
var a = { prototype: Foo, x: 1, y: 2 };
|
||
|
var b = new Foo();
|
||
|
b.x = 2;
|
||
|
b.y = 3;
|
||
|
|
||
|
var result1 = a.value();
|
||
|
var result2 = b.value();
|
||
|
result = result1==3 && result2==5;
|