Javascript examples for Object:prototype
Call method from class without instantiate it
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*w w w . j av a 2 s.com*/ var SuperClass = function(){}; SuperClass.prototype.init = function() { console.log("Init"); }; SuperClass.prototype.init(); var sc = new SuperClass(); sc.init(); } </script> </head> <body> </body> </html>