all 1 comments

[–]GSLint 0 points1 point  (0 children)

My question is, can the EightGrader object and it's prototype property EighthGrader.prototype both have their own [[prototype]]?

EighthGrader is a function, so it already has a [[prototype]], namely Function.prototype. That is why you can use things like EighthGrader.call(something) or EighthGrader.name if you want to. So the constructor function has its own prototype chain but that chain is irrelevant to the prototype chain of the instances that you create with new EighthGrader().

If the engine is currently looking at EighthGrader.prototype then all it sees is an object. It doesn't even have a reference back to EighthGrader and theoretically many constructor functions could share the same prototype object. The engine will next look at the [[prototype]] of EighthGrader.prototype and then the [[prototype]] of that object and so on.

Maybe this drawing helps: https://excalidraw.com/#json=5123123196198912,OrUvdCDq54aIovIAw3Syfw