, this, , . .. this.helperFunc(), helperFunc() ( , .helperFunc ). this helperFunc , Create().
, , .
this .
, helperFunc this.Create, this (window, )
- :
var o = {someVal:"hello"};
o.doSomething = function (){alert(this.someVal)};
o.doSomething() "".
:
var o2 = {someVal:"world"};
o2.someFunc = o.doSomething;
o2.someFunc() "", "", , doSomething o.
:
var someFunc = o.doSomething
someVal = "sailor"
someFunc() "".
- this Setup(). new, , this , Setup.
, new o.doSomething() "undefined", , , "someVal".