I was looking at an inheritance example using prototypes as below:
function Person(name){
this.name = name
}
function Student(name){
Person.call(this, name)
}
Student.prototype = Object.create(Person.prototype)
Student.prototype.constructor = Student
let jim = new Student("Jim")
My question is, why there is a need to set the prototype using Object.create(Person.prototype) Why not simply setting it like Person.prototype?