Hacker News new | past | comments | ask | show | jobs | submit login

Number 14 still confuses me. The base object does have prototypes but can traverse the prototype chain? My brain seizes.



Number 14 is just wrong, or rather its explanation is wrong.

It’s technically correct: not all objects have prototypes (you can trivially make an object without one or remove it from an existing object).

The rest of that “answer” is just nonsense: there is no magic look up of a magic basic object. The default prototype of an object is prototype property of the creation function (e.g Object, String, MyFunction, …), and the top of the chain is Objecy.prototype unless explicitly set to something else.

There’s no magic, and I don’t know how the author got their particular explanation.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: