A JavaScript runtime? What is it?

Photo by Alex wong on Unsplash

I have heard of JS Engine, but what is it?

Just like all other programming languages, even JS requires a compiler to execute the code. The only way (wait till you read further) to run a javascript code is in the browser since the compiler aka the JS ENGINE lives in the browser.

  1. V8 engine by Chrome.
  2. SpiderMonkey by Mozilla.
  3. Chakra by IE

But hey, I don’t see a browser in Nodejs while running my JS code.

Nodejs has the capability to execute the JS code outside the web browser.

Wait, can anyone use chrome’s V8 engine? isn’t it only specific to the browser?

V8 is an Open Source Project created by the Google Chromium team, hence anyone can use it.

So anything that uses v8 is a JS Runtime?

Runtime is nothing but an environment in which the program runs. And any environment having the capability to run a JavaScript code is a JS runtime.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ishwar Rimal — @theHumbleBeing

Ishwar Rimal — @theHumbleBeing


I write articles on JavaScript, electron, and react. Opted for curators for better reach, not money. Open link in incognito to read for free (or contact me)