default object, like 'window' object in browser

Nov 18, 2012 at 11:40 PM

May be it is not correct terminology, but here is what i need.


When i define variable like:

x = 1;

It is in global scope. But is there any possibility to make it as 

a property for some default object? 


I need behavior exact as window object does.

i should be able to access to x as "x" as well as "window.x".

How to achieve this?