Given the following code:
function a() {} function b() {} b.prototype = new a(); var b1 = new b();
We can stay that a was added to the b prototype chain. Fine. And that's right:
b1 instanceof b b1 instanceof a b1 instanceof Object
My question is: what if we do not know the origin of b1 in advance? How can we find members of our prototype chain? Ideally, I need an array like [b, a, Object] or ["b", "a", "Object"] .
Is it possible? In my opinion, I saw an answer somewhere on SO that described how to find out, but I can't let life find me again.
javascript prototype prototypal-inheritance
pr1001 Feb 11 2018-10-11T00 : 10-11
source share