Subj : Re: SeaMonkey: Global properties To : netscape.public.mozilla.jseng From : Anatoly Kochergin Date : Thu Mar 06 2003 07:42 pm Thank you for response. As I understand in the first line ("a=1") a temporary object has been created and then disposed. As a result we get "a" global variable of Number type. It is an object - so we can do "a.a=1". But "a.a" - is not an object. The same situation - but different result, from my point of view. Are all global variables - objects? Brendan Eich wrote: > Anatoly Kochergin wrote: > >> from js console: >> ----------------------------- >> >a=1 >> 1 >> >a.a=1 >> 1 > > > > The number 1 stored in the global property (or global variable, if you > like) a is here wrapped with an instance of the Number class, as if you > wrote Number(1).a = 1. That temporary object then has a property named > 'a' set to the value 1, after which the temporary Number instance > becomes garbage to be collected. > Best Regards, Anatoly .