The Difference Between Javascript and NodeJS

The “TLDR” explanation for the developer who needs a quick answer

Landy
3 min readAug 4, 2020

In this article, I’ll provide a brief overview of the difference between Javascript and NodeJs. If you would like a more in-depth view, I highly recommend taking a look at the MDN Web Documentation. Be warned, there’s a lot to read in the docs, but it’s the perfect resource for reliable, up to date, and accurate information. There are also several amazing articles on Medium. I’ve listed a few here for your convenience.

However, I know how tedious it can be to read lengthy articles when you want an immediate answer, so hopefully, this article will provide you with a satisfactory answer.

Javascript is a prototype-based, single-threaded programming language (I’m simplifying it a lot, there’s so much more to Javascript, however for the sake of this TLDR, know it’s a programming language). Javascript runtime is an environment where Javascript source code executes within. Javascript engines fuel Javascript runtime environments, these engines are also now known as ECMAScript engines. JS Engines are responsible for parsing and executing source code. Since client-side Javascript requires downloading source code and running it on the browser, all major browser vendors such as Chrome, Mozilla, Safari, and even IE/Edge have a runtime environment with an engine. You may have heard of Chrome’s V8 Engine, or Mozilla’s SpiderMonkey Engine.

Image by MDN Web Docs

So how does a developer write and execute Javascript code locally on their machines?

You guessed it. Developers need a runtime environment!

NodeJS is an open-source, runtime environment, which uses Chrome’s V8 Engine, and executes Javascript code outside of a web browser. NodeJS provides the ability to develop server-side Javascript programs. Developers can interact with files hosted on the server, interact with databases, collect form data, and more.

Although NodeJS provides multiple tools to developers disposal, there are various types of frameworks, which utilize Node that help minimize the workload for different kinds of Javascript development. Web frameworks such as Express, Hapi, and Koa, reduce the workload for developing web applications.

There’s also a difference between a browsers runtime environment vs. NodeJS.

One significant difference is the DOM (Document Object Model). The DOM is a Web API provided by the browser’s runtime environment. However, NodeJS is entirely independent of web browsers. Therefore it neither needs nor has a DOM.

To summarize, Javascript is a programming language, and NodeJS is a runtime environment to execute Javascript source code.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Landy
Landy

Written by Landy

Software Engineer | LinkedIn: simpslandyy | IG: miss.simpsonn. |

No responses yet

Write a response