I am trying to set and later access a variable using object literal notation. I need to use this variable in subsequent code so I want to set it here just once.
When I run this code at jsFiddle, I get the error that HalfWidth is NaN. How do I set and access this variable from here?
var $LIST = {
FullWidth: 120,
HalfWidth: this.FullWidth / 2,
exit: function () {}
};
alert($LIST.FullWidth);
alert($LIST.HalfWidth);