You don’t hate JavaScript

But something else might make you think you do

I love JavaScript. I even totally broke up with the beautiful Ruby (after a 10-year relationship) to exclusively date JavaScript. I am happier with JavaScript.

One of my favorite questions that I answered on Quora was about the topic of why people hate JavaScript. It made me compile a list of categories to which I think people who hate JavaScript belong. The truth is, very few good developers hate JavaScript. People who hate JavaScript are probably in one of the following categories:

  • People who hate the DOM API and mistakenly think they hate JavaScript
  • People who hate the Event Loop and mistakenly think they hate JavaScript
  • People who hate frameworks and libraries written in JavaScript and they cannot make the distinction
  • People who hate browser quirks and think JavaScript is the cause of them
  • People who cannot learn JavaScript although they try hard to. Hearing that JavaScript is simple to learn and yet struggling to learn it makes you hate it
  • People who get focused on the bad parts of JavaScript and lose sight of the great things about it
  • People who do not know the bad parts of JavaScript and use them, which would naturally cause them lots of problems.
  • People who depend on standard libraries in other programming languages and find the lack of one in JavaScript a reason to hate it
  • People who are easily overwhelmed with the amount of packages, tools, and things they need to learn to work with JavaScript in different environments

The only valid reason on my list of bad things about JavaScript is that it is not a strongly-typed language. The compromise to that problem is to use something like TypeScript or Flow.

Do you hate JavaScript for any other reasons? Let me know!

Thanks for reading.