Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In JavaScript, classes are mostly just a slightly weird way of setting up prototype chains.

Diagrams help me understand how this works. At the following link, you can see the source code of a simple class and a diagram (section 29.2.2) that shows how all involved objects are connected: https://exploringjs.com/impatient-js/ch_proto-chains-classes...



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

Search: