snowtown
12-11-2002, 10:32 PM
Hi!
I have a question about referencing properties. Lets say I have, for example, the following code:
var Test = {
z : 3,
y : {
w : 8,
x : function(){
alert(Property z);
}
}
};
To invoke the method x of property y, I could use something like this: Test.y.x();
Question; is it possible to alert the value of property z from method x, in a more "elegant" way than: alert(Text.z);?
Thanks
//Peter
I have a question about referencing properties. Lets say I have, for example, the following code:
var Test = {
z : 3,
y : {
w : 8,
x : function(){
alert(Property z);
}
}
};
To invoke the method x of property y, I could use something like this: Test.y.x();
Question; is it possible to alert the value of property z from method x, in a more "elegant" way than: alert(Text.z);?
Thanks
//Peter