author | timkelly |
Mon, 06 Apr 2009 14:24:14 -0500 | |
changeset 54 | ff58688cad6c |
parent 2 | d760517a8095 |
permissions | -rw-r--r-- |
2 | 1 |
|
2 |
||
3 |
function Proto () { |
|
4 |
this.counter = 1; |
|
5 |
this.globalString = "InstanceVar"; |
|
6 |
} |
|
7 |
||
8 |
Proto.prototype = new Object() |
|
9 |
||
10 |
function extra() { |
|
11 |
anotherglobal = 3; |
|
12 |
} |
|
13 |
||
14 |
Proto.prototype.myfunc = function() { |
|
15 |
var oo = inst; |
|
16 |
||
17 |
myglobal = 2; |
|
18 |
extra(); |
|
19 |
||
20 |
this.foo = 3; |
|
21 |
||
22 |
return this.globalString + (this.counter++); |
|
23 |
} |