An object is a collection of named values known as properties. Properties can be either variables that hold the state of the object, or functions that define what the object can do. The appeal of objects is that they provide functionality while hiding their inner workings. All you need to know is what an object can do for you, not how it does it.
An empty object can be created using the new directive in the following explicit manner.
var box = new Object();
Properties for an object are created automatically when they are assigned to, using either the dot notation or the array notation.
box.x = 2;box["y"] = 3; ...