Mega Code Archive

 
Categories / JavaScript Tutorial / Object Oriented
 

Object prototype

Syntax object.prototype.property     object.prototype.method The prototype property allows the addition of properties or method to the Object class. <html>     <body>     <script language="JavaScript">     <!--     Object.prototype.newProperty = 2;     document.write(document.object.newProperty.value);     -->     </script>     </body>     </html>