Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

object initializer in javascript

var obj = { property_1:   value_1,   // property_# may be an identifier...
            2:            value_2,   // or a number...
            // ...,
            'property n': value_n }; // or a string
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #object #initializer #javascript
ADD COMMENT
Topic
Name
5+3 =