JavaScript is certainly one of those programming languages which you can get started within a few hours due to its simple syntax, but would probably take you years to master it.

To master JavaScript it does require an in-depth understanding of how the entire ecosystem works. The core ecosystem of JavaScript consists of 3 main components which are ECMAScript, JavaScript Engine, and the JavaScript Runtime.

It all starts with understanding what is ECMAScript and how is it different from JavaScript and followed by an understanding of the JavaScript Engine and the JavaScript Runtime. It’s because of the JavaScript runtime that NodeJS and Google Chrome can use the same JavaScript Engine and yet have very different implementations of JavaScript for developers.

What is a JavaScript Runtime Or A JavaScript Host?

A JavaScript runtime (Or a JavaScript Host) can be understood as a container that uses the JavaScript Engine to generate APIs that can be used by software developers to create applications using JavaScript. Taking an example of a JavaScript runtime in a browser, it would typically contain the implementations of JavsScript which are more specific to a browser. Whereas a runtime for something like NodeJs would have specific implementations that are more specific to running and building a server-side application using JavaScript.

JavaScript Runtime In Your Browser For Web Development

The JavaScript runtime in the browser has the implementation of JavaScript that enables the developers to develop applications for the web. The web browser’s runtime has the following three important components:

  • The Core Based On ECMAScript - The base implementation of JavaScript with all the input and output functions that the developers can use.
  • Document Object Model (DOM) - This is what the browser renders as a hierarchy of nodes to be displayed to the client or the user for XML and HTML.
  • Browser Object Model (BOM) - This is what allows the developers to manipulate the browser window. Using the BOM the developers can access the browser features and manipulate them outside the context of the DOM or the page that is being rendered.

Let’s dive deeper to understand each of these components in detail.

#javascript #ecmascript #web-development #programming

Three Main Components of JavaScript
3.10 GEEK