.
, JSON. , , - . JSON - .
-, , .
call() apply() -, this window.
myCode , " " . , call() apply(), . , this window, undefined ( window.message undefined).
- . , call() apply().
var myCode =
{
message : "Hello World",
helloWorld : function()
{
alert( this.message );
}
};
myCode.helloWorld.call( myCode );
, Javascript, myCode this, .
- myCode .
var myCode = function()
{
this.message = 'Hello World';
this.helloWorld = function()
{
alert( this.message );
}
}
var mc = new myCode();
mc.helloWorld();
a >