Re:Modern Javascript: Everything you missed over the last 10...
by kentor on Saturday May 15, 2021 @03:45PM
(#27168312)
That is just javascript trivia that one rarely encounters in real code, and shouldn't be used to dismiss the entire language.
Re:Modern Javascript: Everything you missed over the last 10...
by noir_lord on Saturday May 15, 2021 @04:07PM
(#27168520)
To borrow a Stroustrup quote
> "There are only two kinds of languages: the ones people complain about and the ones nobody uses".
I'm not a fan of JavaScript but I do like TypeScript.
Re:Modern Javascript: Everything you missed over the last 10...
by hajile on Saturday May 15, 2021 @11:50PM
(#27171057)
If your statement begins with a curly brace, that brace is a code block, NOT an object literal.
Coercion rules are terrible, but they were only added to the language due to developer demands.
If you worry about zero or empty string, you’ll have problems in tons of other languages. Null vs undefined is less understandable along with the old ability to redefine undefined as it was a variable . In any case, I agree that one of the two shouldn’t exist.
Ok, you got me worked up. I need to go for a run to blow off steam.