parameters in manipulation of an inherited constructor function?
like if it is :
const Person = function (name , family , personId) {
}
const Student = function (name,family,studentId) {
Person.call(this,name,family)
this.studentId=studentId
}
and it should never shows the Pesonid when we use student constructor to making an object out of it and instead of it in the place of Personid it should be studentid and we only should have these 3 parameters not one extra with undefind value which is for personid
now it also shows an extra (personid) with undefind value for me.
You should stop learning from whatever book is teaching this stuff immediately, this is pretty ancient-style JS
i use es6 class , but i want to know this too (if you meant that)
Okay, then clarify your question
Is something missing from Person here?
ok let me ask it with sending a picture of the result
Обсуждают сегодня