DEV Community

Discussion on: How did Javascript click for you?

peerreynders profile image

"JavaScript is most despised because it isn’t some other language. If you are good in some other language and you have to program in an environment that only supports JavaScript, then you are forced to use JavaScript, and that is annoying.

Most people in that situation don’t even bother to learn JavaScript first, and then they are surprised when JavaScript turns out to have significant differences from the some other language they would rather be using, and that those differences matter."

Douglas Crockford, JavaScript - The Good Parts, 2008; p.2

Often JavaScript isn't difficult but simply different - trying to impose a mental model that was shaped by another, preferred language usually only creates grief.

JavaScript is it's own thing and it has to be approached on its own terms. That may require some re-orientation.

MDN: JavaScript:

"JavaScript is a prototype-based, multi-paradigm, single-threaded, dynamic language, supporting object-oriented, imperative, and declarative (e.g. functional programming) styles."

Slavishly adhering to any particular paradigm in JavaScript is probably a mistake, use what works well in JavaScript.