2 ms·
All fixed up now. Thanks for the feedback :) I ended up setting __proto__ directly so that an instanceof test passes.
by gurgus 10y ago
All fixed up now. Thanks for the feedback :) I ended up setting __proto__ directly so that an instanceof test passes.
- dskloet 10y agoLooks like that didn't work either and you ended up with Object.create which is a fairly new function. I think assigning Person.prototype (instead of Person) to p2.__proto__ would have worked. Or is that already what you had before?