/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// class var myClass = function(param) { // private member var myMember = param; // private method var myMethod = function(whatever) { }; //public member this.myPublic = 7; // public method this.myPublicMethod = function(whatelse) { }; }; // prototype (public) myClass.prototype.myNewMember = 7; myClass.prototype.myNewMethod = function() {}; // static myClass.myStatic = 8; // object var myObject = new myClass(7);
Comments
