 <p><strong>Javascript dont have classes</strong></p> <p>But you can systemise your code.Javascript inheritance is totally different from that of othe oop languages.</p> <p>Here,We use prototypes and constructors.</p> <p>*<em>prototype==></em>*In simple words,I am used for extension purpose</p> <p>*<em>constructors==></em>*I am used for creating multiple instances.Any function can be used as a constructor by using the new keyword.</p> <p>Just sample codes for understanding.</p> <p><strong>SAMPLE 1:BY USING OBJECT LITERAL</strong></p> <pre><code>var Myobject = { Function_one: function() { //some code Myobject.function_three(); }, Function_two: function() { //some code Myobject.function_three();//lets say i want to execute a functin in my object ,i do it this way... }, Function_three: function() { //some code } }; window.onload = Myobject.Function_one //this is how you call a function which is in an object </code></pre> <p><strong>SAMPLE 2:BY USING PROTOTYPE</strong> </p> <pre><code>function function_declareVariable() { this.a= 10; //i declare all my variable inside this function this.b= 20; } function_declareVariable.prototype.Function_one = function() { //some code Myobject.Function_three(); }; function_declareVariable.prototype.Function_two = function() { Myobject.Function_three(); }; function_declareVariable.prototype.Function_three = function() { alert(Myobject.a or Myobject.b) //some code }; var Myobject = new function_declareVariable();//this is how i instantiate </code></pre> <p><a href="http://stackoverflow.com/questions/16835451/javascript-prototypes-objects-constructori-am-confused">REFER 1:what are constructors ,prototypes</a></p> <p><a href="http://stackoverflow.com/questions/12201082/prototypal-inheritance-concept-in-javascript-as-a-prototype-based-language">REFER 2:prototypal inheritance</a></p>