Differences between Javascript and NodeJs

Maria Antonella 🦋 - Aug 22 '21 - - Dev Community

At first it was hard for me to understand the differences because for me, they were the same thing. It was all javascript. But then, I started to understand what each one was used for. For this reason, I share it :)

☘ JavaScript is a language that runs inside web browsers as part of the documents loaded by the browser and is used as a client-side development language. It provides the behavior of the pages. Like HTML it provides the semantic structure and CSS the look and feel.

However, being an interpreted language, it needs an interpreter to run. V8 is Google Chrome's JS engine and 'node' is a front-end that can be used to run JavaScript scripts outside the browser. In other words:

☘ NodeJs is an open source, cross-platform environment that allows you to create server-side applications and tools using JavaScript.

A short list of comparisons 🧐💻:

JS
🔴 Can only be run in the browsers
🔴 Used on the client-side
🔴 Capable enough to add HTML and play with the DOM
Enter fullscreen mode Exit fullscreen mode
NodeJs
🟡 Can be run outside the browser
🟡 Used on the server-side.
🟡 Does not have the capability to add HTML tags
Enter fullscreen mode Exit fullscreen mode
. . . . . . . . . . . . . . . . . .
Terabox Video Player