DEV Community

Cover image for How JavaScript became a backend language (node.js)
Ahnaf ahamed
Ahnaf ahamed

Posted on • Originally published at blog.ahnaf.dev

How JavaScript became a backend language (node.js)

What is JavaScript

JavaScript was initially introduced to add scripts(JavaScript programs are known as scripts) to web pages in the Netscape Navigator browser, since it's inception all the major browsers have adopted the use of JavaScript. Fast forward to today and you can do much more with JavaScript. When companies started adopting JavaScript, a standard document called ECMAScript standard was written by ECMA International organization to maintain a standard in the language. Theoretically JavaScript can also be called as ECMAScript.

How come a language developed for writing code for the browser evolve into a server side programming language ?

Today, JavaScript is not limited to the browser, you can write JavaScript on any device that has a JavaScript engine (A JavaScript engine is a software component that executes JavaScript code) Some of the popular JavaScript engines are

V8 - used in chrome, Microsoft edge, Opera, Node.js etc.
SpiderMonkey - used in Firefox
JavaScript Core - used in Safari
All the programming languages were developed with a specific purpose.

JavaScript for the browser

PHP for web server

Swift for IOS applications

etc.

With introduction of Node.js, JavaScript become a backend language as well. Node.js was built on top the v8 engine which already supported JavaScript. What makes Node.js standout is it's non-blocking I/O model which makes it efficient, Node.js can asynchronously continue executing code while listening for other events.

If you are someone new to the world of programming, you could build full stack web applications with the knowledge of one language. Also front-end developers who primarily use JavaScript can work on the backend without learning a new language.

Finally I want to leave this famous quote by Jeff Attwood also known as the Atwood's Law.

Atwood's Law: any application that can be written in JavaScript, will eventually be written in JavaScript

Top comments (0)