Coercion leads to an unpredictability and that means that the uncertainity is high therefore there's a risk for code to be erroneous. A risk that should usually be avoided by the language itself.
In simpler situations it might be okay-ish but in large codebases, with other things that contend to the unpredictable nature of Javascript, it does get messy and difficult and this holds specially true for data structures!
One person's opinions on the JavaScript language don't do much to rebut my opinion regarding one's data structures and how they serialise into JavaScript or indeed any other language silly enough to have null or undefined types, let alone two of them.
5
u/[deleted] May 28 '19
Kyle Simpson would disagree. Coercion can be useful and is a valuable part of JavaScript to understand.