HomepageExploring JavaScript (ES2025 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” (short: “ES6”) refers to a version of JavaScript

ECMAScript is the name of the language standard; the number X in “ECMAScript X” and “ESX” refers to a version of that standard. Initially the versions were ordinal numbers (ES1–ES6). Later, they were years (ES2016+). For more information, see “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 help.

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 we create something in JavaScript, we can rely on many people being (potentially) interested. And there is a large pool of JavaScript programmers from which we can hire, if we 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, we 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, most tools for JavaScript are written in JavaScript or at least support plugins written in it. Even native tools are installed the same way as all other JavaScript-related software – via package managers such as npm.

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 we will constantly learn new things. The downside is that the constant change can be exhausting at times. Thankfully, many things have become stable – e.g., built-in modules (ECMAScript modules) were introduced in 2015 but took nearly 10 years to become more popular than their non-built-in alternative, CommonJS Modules.