IanMcCall.CODES

Why I Love JavaScript

While I am experienced in many languages (Ruby, Python, Perl, Java, etc…), my language of choice is JavaScript.

I really do have more fun coding in JavaScript than in any other language. And now, with the rise of Node.js, JavaScript has a legitimacy and respectability that it hasn’t had before. Oddly, my favorite parts about JavaScript also tend to be the same things that everyone complains about. I love JavaScript, and here are a couple reasons why.

It’s Easy

Getting started with JavaScript is easy. You don’t need a software licence or a compiler or web server. You don’t even need an internet connection! All you need is a web browser. Just open up the dev tools and you have a JavaScript console right there for you, ready to do your bidding. You don’t need to worry about things like type declaration or building classes.

If you don’t know anything about JavaScript, you can learn using free tools like Codecademy or W3Schools. More help is just a Google search away. I would argue that the barrier to entry for JavaScript is lower than for any other language.

Async

This is probably the part about JavaScript that those coming from other languages have the most trouble with, and that I love the most. JavaScript is inherently asynchronous. Meaning that it is sometimes harder to make JavaScript block and execute sequentially than it is to have multiple “parellel” threads of execution (It’s not really parallelism, but it helps to sometimes think of it in a similar way). In most languages, if you want to “observe” for an event you have to implement a loop that performs all of the necessary checks to catch the event, or you have to include a library that does those checks for you. In JavaScript, this kind of event observe looping is a core part of the language.

In the future I’ll post more about asynchronicity in JavaScript, because it’s such an important part of the language. I’ll also post more about other good parts about JavaScript.