Re:JavaScript for Impatient Programmers
by hombre_fatal on Wednesday July 01, 2020 @01:14PM
(#23703926)
It specifically gives you an example of how "==" clearly sucks and shows you how "===" fixes it. I don't see why a "guide for professional programmers that know more than the average JS programmer" (as per the request) would need to belabor that any further.
[ Parent
| on HN ]
So what types are converted to what, automatically? And is it only for == or there are other traps?
In most languages that I know this is documented. They don't tell you "this sucks don't use it".
Re:JavaScript for Impatient Programmers
by tomlagier on Wednesday July 01, 2020 @07:16PM
(#23707990)
I think this is what you're looking for. 3rd result for "Javascript type coercion": https://2ality.com/2019/10/type-coercion.html
Sorry, I'm looking for a comprehensive manual, not a series of random blog posts. I knew about type coercion because everyone laughs at it, but what about the things I don't know to ask about because I don't know they exist?
Did you... read the link? It's literally exactly what you're asking for.
Sorry for trying to help I guess, good luck.
I did. It explains type coercion. Itβs not a comprehensive JavaScript manual.
> So what types are converted to what, automatically? And is it only for == or there are other traps?
This is the question that you asked and that I answered.
If you're looking for the language specification, it's here (first result for "Javascript specification"): https://www.ecma-international.org/ecma-262/11.0/index.html#...