Javascript examples for Object:prototype
Calling a method without brackets for Prototype using prototype.__defineGetter__
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {// w ww. java2s.c om String.prototype.__defineGetter__("world", function() { return this + ' world'; }); console.log("hello".world); }); </script> </head> <body> </body> </html>