
Why JavaScript Is The World’s Most Popular Programming Language
How did JavaScript establish itself as the dominant web development language?
JavaScript (JS) is, and has been for many years, the most popular programming language in the world among developers. For most of the history of the internet, JavaScript has been the de-facto programming language to use when building websites. In somewhat recent years, JavaScript has evolved to become used for virtually any software, including server-side code and both desktop and mobile applications.
When people speculate on why JavaScript is so popular, they will often provide shallow answers. Some might say that JavaScript caters to all skills levels; others that JavaScript is popular because it can be used for so many things. Others yet will attribute the popularity of JavaScript to its modern frameworks.
Yes, surely JavaScript is popular because of all of those things, but why did they happen to begin with? Why did people choose to build modern frameworks for JavaScript and not any other programming language? Why are there so many frameworks built on JavaScript and not other programming languages? And why make JavaScript into a server-side language?
From my point of view, all of this happened for two reasons: versatility and backward-compatibility.
JavaScript was first invented in 1995 in a mere ten days, and on top of all that, it’s fully backward-compatible. That means that, in theory, any website made in 1995 is still functional today (though in practice, neither HTML nor CSS, two of the other pillar stones of web development, are backward-compatible). This comfort of knowing that you don’t have to rebuild your website when a new version launch is a big deal in a space where version updates can often break software.
Did you notice that I mentioned that JavaScript was made in just ten days? That’s an incredible accomplishment. The original launch of JS was quite barebones — and it has since naturally been updated extensively. This barebones initial release has allowed JavaScript to become incredibly versatile. It’s a programming language that’s easy to adapt. Look at frameworks such as Angular, Node, and React. All three of them have such different syntax to the point that they almost look like they are completely different programming languages.
JavaScript is a programming language where you can write nonsensical code like this:
"" - - "" + !!NaN - [,]; // -> 0JavaScript will just accept it as valid syntax. The code expression above looks horrendous but is the reason why JavaScript is such a popular programming language. Any mistakes of the past are still allowed.
To summarize, two reasons have attributed to making JavaScript the most popular programming language in the world:
- Backward-compatibility. Any website made today should still work fifty years into the future.
- Adaptability. JavaScript can be shaped into anything you want it to be, which means that JavaScript can evolve in ways that few other programming languages can.
JavaScript will most likely continue to dominate the web for many years to come and will continue to creep into desktop and mobile applications.
More content at plainenglish.io
