I’ve been following the Learn Web Development track and this is my first time on the forums.
Understanding Object prototypes and inheritance has been a super confusing journey so far. In this article we’re supposed to set Teacher()'s prototype and set constructor reference. A few questions:
Why is the below code necessary after we’ve defined a Teacher constructor function using Person.call in the function body?
Apologies, just a bit busy these days. I think @lakshverma23 question is a great one. I am still looking into it. The way I work is to run the code itself and see the outcome.
You might notice the double forware slashes on the last image where it starts with “// Teacher.prototype = …”
so I am just wondering if there is any object inheritance in this case and if the prototype of teacher is person in this case. I m going to have to look a bit further and get back.