Compare Revisions

Using Object Initializers

Change Revisions

Revision 117898:

Revision 117898 by JdeValk on

Revision 117899:

Revision 117899 by Laptopman on

Title:
Using Object Initializers
Using Object Initializers
Slug:
JavaScript/Guide/Obsolete_Pages/Creating_New_Objects/Using_Object_Initializers
JavaScript/Guide/Obsolete_Pages/Creating_New_Objects/Using_Object_Initializers
Content:

Revision 117898
Revision 117899
n17objectName = {property1:value1, property2:value2,..., propertyN:vn17objectName = {property_1:value_1, property_2:value_2,..., propert
>alueN}>y_n:value_n}
n29if (cond) x = {hi:"there"}n29if (cond) x = {hi:"there"};
t35myHonda = {color:"red",wheels:4,engine:{cylinders:4,size:2.2}}t35myHonda = {color:"red",wheels:4,engine:{cylinders:4,size:2.2}};

Back to History