JavaScript at 25: The programming language that makes the world go round

JavaScript is now the world's most popular programming language, even though it started off as a side-kick to Java.

Programming language popularity: JavaScript leads fast-growing Python

The programming language JavaScript emerged 25 years ago and has grown to become one of the most important pieces of the web and browser applications we use today. 

JavaScript is the go-to language for front-end development and has spawned Microsoft's Typescript, a superset of JavaScript with a stronger optional type system for developers that compiles to JavaScript when run in the browser. 

Both JavaScript and TypeScript conform to ECMAScript, the standard for JavaScript and node.js, the runtime for running applications outside of the browser thanks to Google's powerful V8 JavaScript engine.

SEE: Meet the hackers who earn millions for saving the web, one bug at a time (cover story PDF) (TechRepublic)

JavaScript's impact on the web cannot be understated. Tech giants have thrown their weight behind the language. Besides Google's V8, there are open-source projects like React from Facebook and Angular from Google, which help spread web applications across smartphones and desktop.  

After Netscape and Sun Microsystems – where Java was hatched in May 1995 by James Gosling – announced JavaScript in December 1995, Microsoft promoted Visual Basic (VB) as a standard for creating web applications using VB Script for its Internet Explorer browser. Oracle would go on to buy Sun Microsystems in 2008 largely to get its hands on Java and its huge development ecosystem.  

JavaScript's most important designer is Brendan Eich, a co-founder of Firefox maker Mozilla and now chief of Brave, one of the many browsers based on the Google-led Chromium project. Eich was at Netscape in 1995 when he created a Unix version of Mocha, the precursor to JavaScript. 

JavaScript was originally thought of as a "Java side-kick scripting language", where all sophisticated programming tasks would be done via Java applets, according to Eich. But Eich says web developers soon realized they only needed JavaScript.

JavaScript is now the most popular programming language in the world and the most widely used language in open-source projects hosted on Microsoft-owned code-collaboration site GitHub, while Java's popularity is waning

But JavaScript's future was not always as certain as it is today. 

Cory House, a JavaScript-focused educator on developer training site Pluralsight, recalls that it wasn't clear whether JavaScript would take off.  

"It was written in a few days, and initially only offered in a single browser. Microsoft's first browser shipped with their own flavor of JavaScript called JScript. Today, JavaScript makes the world go 'round. It runs on every computer. Every phone. TVs. Even some appliances. A huge portion of humanity relies on JavaScript every day without realizing it," said House.

"You can code in an object-oriented or functional style. And since JavaScript has a C-like syntax, it feels familiar to people who have worked in other C-like languages. JavaScript remains "timeless" by continually embracing good ideas from other languages," he adds. 

Jonathan Mills, another Pluralsight author, points out that JavaScript is no longer contained to the browser. 

"Now JavaScript has grown into a massive ecosystem that has impact in every area of software development," he said. 

Microsoft's TypeScript has grown in popularity on GitHub thanks to the existence of larger JavaScript-based projects, but it too could be unseated by emerging technologies coming through Web Assembly, a specification and language being handled through the World Wide Web Consortium (W3C).

Major web browsers now support WebAssembly or Wasm on a similar level to HTML, CSS, and JavaScript after the body approved the standard in December 2019

WebAssembly is a virtual instruction set architecture that enables high-performance applications on the web, and sets the stage for more AI on the web that can be used in video and audio codecs, graphics, and cryptographic computations.

SEE: Programming languages: Microsoft TypeScript leaps ahead of C#, PHP and C++ on GitHub

For now though, Web Assembly has potential in targeted areas, Mills tells ZDNet. 

"When building a JavaScript application, the JavaScript code is sent to the browser as is and is compiled and run there in the browser at run time. WebAssembly shortcuts this process by compiling the code before deployment and hopefully gives a significant performance boost in the process," says Mills. 

"This is incredibly useful when building complex web applications that are graphics- or computation-intensive. The most significant hurdle at this moment, however, is that the most prominent languages associated with WebAssembly are Rust and C. JavaScript has taken off in part because of its ease of use and rapid development style. Neither are qualities found in C and Rust."