The main differences between Javascript and Nodejs.

Vamsi K
2 min readNov 6, 2020
Js vs node.js
Javascript vs Node

Javascript:

Lightweight, interpreted, object-oriented language with first-class functions.

JavaScript is most known as the scripting language for Web pages but used in many non-browser environments as well such as node.js or Apache CouchDB.

It is a prototype-based, multi-paradigm scripting language that is dynamic, and supports object-oriented, imperative, and functional programming styles.

Node.js:

A platform built on Google Chrome’s JavaScript V8 runtime for easily building fast, scalable network applications.

Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

Let's get into the differences:

Type:

JavaScript is a programming language. It running in any web browser with a proper browser engine.

Node.js is an interpreter and environment for JavaScript with some specific useful libraries which JavaScript programming can use separately.

Utility:

Javascript is mainly used for any client-side activity for a web application, like possible attribute validation or refreshing the page in a specific interval, or provide some dynamic changes in web pages without refreshing the page.

Node.js is mainly used for accessing or performing any non-blocking operation of any operating system, like creating or executing a shell script or accessing any hardware-specific information, or running any backend job.

Running Engine:

JavaScript runs in any engine like Spider monkey (FireFox), JavaScript Core (Safari), V8 (Google Chrome).

Node.js only runs in a V8 engine which mainly used by google chrome. And javascript program which will be written under this Node JS will be always run in V8 Engine.

Programming Standards:

JavaScript is normally following Java Programming language standard. There may have some different ways of writing code but at the same time, we can say it following Java Programming language standard.

Node.js is written in C++, and provides V8 engine base browser javascript running engine which helps us to run a written javascript program in any browser environment.

Operation System related:

JavaScript has some specific object for accessing any operating system specific non-blocking task but all of them are operating system specific.

Node.js is given utility to run some operating system specific non-blocking tasks from any JavaScript programming. It doesn’t have any operating system specific constant. It is very much familiar to create a specific binding with the file system, and also allowing developers for reading or sometimes write on disk.

--

--