Is node. js similar to js | Sololearn: Learn to code for FREE!

+1

Is node. js similar to js

2/10/2021 12:03:31 PM

Pranay Sehgal

6 Answers

New Answer

+5

[Part 1 of 2] Pranay Sehgal It might help to understand a few basic terms related to the Javascript ecosystem to better understand how these are related. Programming Language: Javascript, itself, is a general purpose programming language, based on the ECMA-262 language specification. As with any other programming language, there are no assertions, requirements, or conditions of how or where Javascript is used. Javascript Engine: Javascript, as a modern programming language, requires one of many different Javascript engines (ie V8, SpiderMonkey) that serve as a JIT compiler to convert the code into computer instructions that can be executed. Runtime Environments: Javascript engines require a runtime environment to load and execute the JS code. While the initial runtime environments were browser based, everything changed when Google released its first version of the Chrome browser powered by the V8 engine back in 2008. (continued...)

+6

[Part 2 of 2] Pranay Sehgal The V8 engine not only could be used with the Chrome browser runtime environment, it could also be used in runtime environments completely outside of the browser. Such non-browser runtime environments include NodeJS and Deno which allow for the Javascript language, as defined by the ECMA-292 language specification, to execute code. This is similar to many other languages in their respective runtime environments (ie - Python, Ruby, PHP, etc). In fact, V8 is the engine used for the Electron Desktop Application framework, which is what VS Code is built with. V8 is also used in MongoDB as the Javascript engine to power their query language. There are actually many other examples of V8 in non-browser runtime environments. In short, NodeJS is a runtime environment for executing ECMA-262 Javascript code via the V8 engine. Chrome, likewise, is a browser runtime environment for executing ECMA-262 Javascript via the same V8 engine. I hope this clears things up.

+5

nodejs is a runtime environment for javascript that let you execute javascript as a server side language . Javascript itself is a client side programming language

+1

No , just google it . Javascript runs in browser only while node js allows javascript to be executed outside browser.

0

0