4 ms·
Uhhh. I hated JS for years and years until I started to actually look at it. If you just follow a few relatively simple rules JS is actually very nice and "rel
by umpalumpaaa 2y ago
Uhhh. I hated JS for years and years until I started to actually look at it.
If you just follow a few relatively simple rules JS is actually very nice and "reliable". Those "rules" are also relatively straight forward: let/const over var, === unless you know better, make sure you know about Number.isInteger, isSafeInteger, isObject etc etc. (there were a few more rules like this - fail to recall all of them - has been a few years since i touched JS) - hope you get the idea.
Also when I looked at JS I was just blown away by all the things people built on top of it (babel, typescript, flowtype, vue, webpack, etc etc).
- Buttons840 2y agoThat's a pile of tricks, not a mental model though. A mental model might be something like "JavaScript has strict and non-strict comparisons", but there are no strict less-than comparisons for example, so remembering to use === instead of == is just a one-off neat tip rather than an application of some more general rule.
- umpalumpaaa 2y agoI was not trying to imply that this is a mental model. I was merely commenting on OPs comment about JavaScript.