A JavaScript runtime? What is it?

Ishwar Rimal
2 min readMay 15, 2020

--

As you might have heard about DENO a lot these days. It claims to be a JS runtime just like NODE. But what is a JS runtime?

Photo by Alex wong on Unsplash

To understand this, let’s first dive into other related concepts.

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.

Many browsers came up with their own JS engine:

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

and so on, the list is huge. Refer here for the list.

The most common among all these is Chrome’s V8 engine.

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.

This is because it uses chrome’s V8 engine for executing the JS code.

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.

And apparently, it's not specific to the browser. Any standalone application with a suitable environment can use v8.

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.

So yes, just like Chrome, Firefox, or any other browser, Node is also a JS runtime. DENO is a new JS runtime.

New to deno? follow this link (create a server with deno) to create your first deno project.

I hope you found this article useful. I would love to hear your thoughts. 😇

Thanks for reading. 😊

Cheers! 😃

If you find this article useful, you can show your appreciation by clicking on the clap button. As the saying goes, ‘When we give cheerfully and accept gratefully, everyone is blessed’.

--

--

Ishwar Rimal

Senior FrontEnd Engineer at Intuit. 8 years experience. I write articles on JavaScript, React, Web Optimisation, Startups, Work Life Balance, etc. ❤️ JavaScrip