Hi,
Lets say I have the following javascript:
var obj = {
key1 : "it ",
key2 : key1 + " works!"
};
alert(obj.key2);
This errors with "key1 is not defined". I have tried
this.key1
this[key1]
obj.key1
obj[key1]
this["key1"]
obj["key1"]
and they never seem to be defined.
How can I get key2 to refer to key1's value?