Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object literal javascript

/*A JavaScript object literal is a comma-separated list of name-value pairs
wrapped in curly braces. Object literals encapsulate data, 
enclosing it in a tidy package. This minimizes the use of global variables which
can cause problems when combining code.
*/
var myObject = {
    sProp: 'some string value',
    numProp: 2,
    bProp: false
};
Source by www.dyn-web.com #
 
PREVIOUS NEXT
Tagged: #object #literal #javascript
ADD COMMENT
Topic
Name
9+9 =