Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on JavaScript: prototype vs. class. Parent comment
Foo.prototype.constructor = Foo;
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Ob...
That said, it's a pretty common bug, particularly with stuff like:
Foo.prototype = Object.create(FooParent.prototype) // Crockford-style inheritance console.log(Foo.prototype.constructor.name) // "FooParent"
There are no comments on this comment yet.
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Ob...
That said, it's a pretty common bug, particularly with stuff like: