The initial implementation of JavaScript was rushed and ended up with strange, seemingly broken behavior in some places.<p>The WAT talk (<a href="https://www.destroyallsoftware.com/talks/wat" rel="nofollow">https://www.destroyallsoftware.com/talks/wat</a>) by Gary Bernhardt shows some of the JavaScript strangeness.
This used to be more of a thing than it is now, in my experience. Culturally, it took a while for the perception of Javascript to change from "that janky language you had to use to animate web pages" to a general purpose language on the level of Python or Ruby. Node/React/Vue/etc. have been around long enough now that I think most of that has died out, though obviously, many still have a personal distaste for the language.