I want stop inheriting a certain property from the parent object. How can I achieve that through inheritance in Javascript?
Here's an example:
var fun1 = function () {
this.name = "xxx";
this.privatenumber = 98765432100;
}
fun1.prototype.f = "yyy";
var obj1 = new fun1();
var fun2 = function () {}
fun2.prototype = Object.create(obj1);
var obj2 = new fun2();
In this example I don't want to inherit the privatenumber property to child.