I can see that there are many ways to implement inheritance, such as combinatorial inheritance and parasitic inheritance, and some of them have many shortcomings. I feel that either the following or es6 can realize inheritance very well. Why are there any of the above methods
?function Parent(name) {
this.name = name
}
Parent.prototype.getName = function() {
console.log(this.name)
}
function Child(name) {
Parent.call(this, name)
this.*** = ***
///
}
Child.prototype = Object.create(Parent.prototype)
child.prototype.fn = function***
///