Post

Web dev friends: What was your "aha!" moment in web dev? What revelation or scenario made you a senior? What made you find out "how the sausage is made" that fundamentally changed your view on web development? (Please boost for reach 🙏)

In JavaScript everything is a an object. Functions? Objects. Strings? Objects. Numbers? Objects. All objects with prototypes. Also classes are just syntactic sugar for prototype chaining. I think digging into the output of typescript before ES6 classes was the biggest aha moment for me.

Oh! And prototypes? ALSO OBJECTS! Just another property that is an object itself. And they have their own prototypes! It’s prototypes all the way down baby! It’s why hasOwnProperty exists and behaves in its weird way. Not really weird when you think about prototype chains.

No replies yet.