#target photoshopAnd now with the added "var" keyword:
function test()
{
this.a10 = function()
{
a = 10;
this.a20();
return a;
}
this.a20 = function()
{
a = 20;
}
}
t = new test();
alert( t.a10() ); // Returns 20!
#target photoshop
function test()
{
this.a10 = function()
{
var a = 10;
this.a20();
return a;
}
this.a20 = function()
{
var a = 20;
}
}
t = new test();
alert( t.a10() ); // Returns 10
No comments:
Post a Comment