function MyClass() { //This function is same as a constructer alert("New Object Created"); } //Creating Object var MyObject = new MyClass (); NewObject.prototype = { //Adding Method named "MyMethod" MyMethod: function(){alert("My Method");} , //Adding property named "MyProperty" MyProperty: "My Property" } //Calling Method MyObject.MyMethod(); //Assigning Property MyObject.MyProperty = "My Property Value changed";