Comment

Comment by sam0x17

Except they will actually deal with all of it. First question I get is usually "what is var" followed by "when do I use arrow functions and when do I use normal functions" shortly followed by "why does this code work with a normal function but not with an arrow function" or "why does my code using classes and arrow functions not work on [ancient browser some family member has for some reason]?". I'll also get numerous questions about whether it is a good practice to do things like `x++` where `x` is a string because they noticed that it happens to work and legitimately want to know if this is good practice / by design (oof). Don't even get me started on the "equality in js" discussion.

The key problem with js is the relationship between objects and functions is extremely confusing. You end up having to explain associative arrays, and spend 30+ minutes doing some hand-waving to even begin to describe what an object actually is in JavaScript. Then they get it. Contrast that with something like Java or even Rust where, despite the other complexities, it's pretty clear what the data is and how it is stored.

parent sam0x17 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton