| Applying science to business management |
  
Object Literals
In addition to using an object constructor, you can create
objects using an object literal. For example,
var
x={name:"Pi",value:3.1415};
An object literal consists of a list of properties enclosed in
braces. Each property consists of the property name followed by
the colon character (:) and the property value.
Objects can be nested so that property values can be other
objects. For example,
var x={
PI:{name:"Pi",value:3.1415},
E:{name:"E",value:2.71828}
};
A more detailed description of objects can be found in the
chapter entitled Objects.
|