This should help: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript
Its simple . example:- creating a Person Object var Person={ age:0, name:null, initialize:function(){ this.age=25; this.name='Rehan' } }; Person.initialize(); Code (markup):