JavaScript Object Literal An object literal is a comma separated list of name value pairs wrapped in curly braces. In JavaScript an object literal is defined as follows: var myObject = { sProp: 'some string value', numProp: 2, bProp: false };
Literal means fixed value in source code. In ECMAScript scripting language its possible to represent object as literal. e.g.
var newobj = {
var1: true,
var2: "very interesting",
method1: function () {
alert(this.var1)
},
method2: function () {
alert(this.var2)
}
};
newobj.method1();
newobj.method2();
Attribution : http://en.wikipedia.org/wiki/Literal_%28computer_programming%29