var MyDemoClass = L.Class.extend({ // A property with initial value = 42 myDemoProperty: 42, // A method myDemoMethod: function() { return this.myDemoProperty; } }); var myDemoInstance = new MyDemoClass(); // This will output "42" to the development console console.log( myDemoInstance.myDemoMethod() );
L.Class.extend()