4 ms·
I love JS. JS and its big brother TS are my #1 choice for front end development. What I hate about them is two things: 1. Rules for semicolons. Sometimes you
by mimixco 5y ago
I love JS. JS and its big brother TS are my #1 choice for front end development.
What I hate about them is two things:
1. Rules for semicolons. Sometimes you feel like a nut; sometimes you don't.
2. = and ==. Ugh. The Bug Maker.
3. + for concatenation. Yikes!
4. Arrays are objects except when they're not but objects aren't arrays. :-(
JS is essentially Lisp w/o parens. Everything is an object. Everything is by reference. And everything is mutable. Lisp is what we use on the backend and these two are kissing cousins.
- avinassh 5y ago> 2. = and ==. Ugh. The Bug Maker. You mean == and === ?
- ryanchants 5y agoI believe they are referring to: let x = 5; if (x=3) { foo(); } The common defensive way of handling this is: if(3=x) { so it errors and catches the missing =
- mimixco 5y agoYes, that. = is for assignment and == is a test. The test inside your if needs == to work.