HomepageExploring JavaScript (ES2024 Edition)
You can support this book: buy it or donate
(Ad, please don’t block.)

3 Why JavaScript?

In this chapter, we examine the pros and cons of JavaScript.

Icon “reading”“ECMAScript 6” and “ES6” refer to versions of JavaScript

ECMAScript is the name of the language standard; the number refers to the version of that standard. For more information, consult “Standardization: JavaScript vs. ECMAScript” (§5.2).

3.1 The cons of JavaScript

Among programmers, JavaScript isn’t always well liked. One reason is that it has a fair amount of quirks. Some of them are just unusual ways of doing something. Others are considered bugs. Either way, learning why JavaScript does something the way it does, helps with dealing with the quirks and with accepting JavaScript (maybe even liking it). Hopefully, this book can be of assistance here.

Additionally, many traditional quirks have been eliminated now. For example:

Lastly, JavaScript’s standard library is limited, but:

3.2 The pros of JavaScript

On the plus side, JavaScript offers many benefits.

3.2.1 Community

JavaScript’s popularity means that it’s well supported and well documented. Whenever you create something in JavaScript, you can rely on many people being (potentially) interested. And there is a large pool of JavaScript programmers from which you can hire, if you need to.

No single party controls JavaScript – it is evolved by TC39, a committee comprising many organizations. The language is evolved via an open process that encourages feedback from the public.

3.2.2 Practically useful

With JavaScript, you can write apps for many client platforms. These are a few example technologies:

JavaScript is supported by many server platforms and services – for example:

There are many data technologies available for JavaScript: many databases support it and intermediate layers (such as GraphQL) exist. Additionally, the standard data format JSON (JavaScript Object Notation) is based on JavaScript and supported by its standard library.

Lastly, many, if not most, tools for JavaScript are written in JavaScript. That includes IDEs, build tools, and more. As a consequence, you install them the same way you install your libraries and you can customize them in JavaScript.

3.2.3 Language

3.3 Pro and con of JavaScript: innovation

There is much innovation in the JavaScript ecosystem: new approaches to implementing user interfaces, new ways of optimizing the delivery of software, and more. The upside is that you will constantly learn new things. The downside is that the constant change can be exhausting at times. Thankfully, things have somewhat slowed down, recently: all of ES6 (which was a considerable modernization of the language) is becoming established, as are certain tools and workflows.