2
|
1 |
|
|
2 |
function Proto () {
|
|
3 |
}
|
|
4 |
|
|
5 |
Proto.prototype = new Object()
|
|
6 |
|
|
7 |
function extra() {
|
|
8 |
anotherglobal = 3;
|
|
9 |
}
|
|
10 |
|
|
11 |
Proto.prototype.myfunc = function() {
|
|
12 |
var oo = inst;
|
|
13 |
|
|
14 |
myglobal = 2;
|
|
15 |
extra();
|
|
16 |
|
|
17 |
this.foo = 3;
|
|
18 |
|
|
19 |
globalString = "77" + globalString;
|
|
20 |
return globalString;
|
|
21 |
}
|