Javascript examples for Object:prototype
Create a callable prototype method within another prototype
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){//from w ww . j av a2 s. c o m Parent = {}; Parent.__proto__ = { child: function(arg) { console.log(arg); } }; Parent.child('test') console.log(Parent); } </script> </head> <body> </body> </html>