Classes


var myObject = { 
   property1 : MyProp,
   method1 : function() {
   }
   property2_Array : [ {arrayelement1 : "one"} {arrayelement2 : "two"} ];
}

A empty object literal

var myObject = { } 

This uses object literal notation

var myobject = { 
   name: "MyName",
   age: 20
};



Object Literals

This has 2 members
One property and one method

var myObject = { 
   Property_Status : "Ready",
   Method_DoSomething : function() {
      alert('something');
   }
}




© 2018 Better Solutions Limited. All Rights Reserved. © 2018 Better Solutions Limited TopNext