回答編集履歴
1
修正しました。
answer
CHANGED
@@ -4,13 +4,14 @@
|
|
4
4
|
var Hoge = function(){
|
5
5
|
var foo = null;
|
6
6
|
this.bar = null;
|
7
|
-
this.baz = function(){return Hoge.
|
7
|
+
this.baz = function(){return Hoge.corge(foo)};
|
8
8
|
this.quux = function(){return this.qux(foo)};
|
9
9
|
};
|
10
10
|
Hoge.prototype = {
|
11
11
|
qux:function(x){return x}
|
12
12
|
};
|
13
|
+
Hoge.xyzzy = function(self){return self.foo}
|
13
|
-
Hoge.
|
14
|
+
Hoge.corge = function(x){return x}
|
14
15
|
|
15
16
|
var instance = new Hoge();
|
16
17
|
Hoge.xyzzy(instance); //undefined
|