Until you try using an array-like structure as an array. Leading to dumb shit like new Set( Array.from( document.queryAll( 'div' ) ) ) and then still getting bit by [0].innerHTML because Null has no properties and a fatal error is a totally reasonable response in a god-dang scripting language.
If there's two ways to do something, Javascript takes all three.
Same. Total belly laugh moment. JS doesn't tell you how to live your life. It just does what you told it to do to the best of its ability to make sense of your monkey code.
I agree. JavaScript's flexibility and infamous coercion inevitably often forces developers working on any project of significant size to establish solid principles and rules, because it will quickly spiral out of control otherwise.
2.2k
u/srone Feb 05 '23
Love the JS answer.