The introduction of
- Optional chaining and function invocation by default.
?()are no longer necessary. Still want to blow up the whole app when traversing goes awry? Use the coalescing operator:
uh.oh.spaghettio ?? throw new Error(‘burn it down’);.
null === undefined. Then you only have to check one value. Why the hell are there two “empty” values anyway?!
typeof null === ‘undefined’. In keeping with the above point.
NaNis the only falsy number we need.
- Nothing coerces to a number. Use
parseFloatto coerce strings.
+is only for addition, not string concatenation. Use template literals instead.
NaN(a falsy value!) for no matches, not
- No Automatic Semicolon Insertion. Stop being lazy, developers.
- Only strict equality is allowed.
==does the same as
parseIntradix always defaults to
10. I mean, how many times have you meant for it to be
“use strictest”; 😆