Javascript examples for Object:Constructor
delete operation on instance itself versus on constructor
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){// w ww .j av a2s.c o m function Person(){ this.name='person'; } function Parent(){ this.name='parent'; } Person.prototype=new Parent(); var person1=new Person(); person1.name='newPerson'; console.log(delete (Person.name)); console.log(person1.name); } </script> </head> <body> </body> </html>