📜  Node.JS 和 Javascript 的区别

📅  最后修改于: 2021-09-12 11:16:56             🧑  作者: Mango

1. 节点:
NodeJS 是一个跨平台、开源的 Javascript 运行环境,允许 javascript 在服务器端运行。 Nodejs 允许 Javascript 代码在浏览器之外运行。 Nodejs 带有很多模块,主要用于 Web 开发。

2. JavaScript :
Javascript 是一种脚本语言。它主要缩写为JS。可以说Javascript是ECMA脚本的更新版。 Javascript 是一种使用 Oops 概念的高级编程语言,但它基于原型继承。

Nodejs 和 JavaScript 的区别:

S.No Javascript NodeJS
1. Javascript is a programming language that is used for writing scripts on the website. NodeJS is a Javascript runtime environment.
2. Javascript can only be run in the browsers. NodeJS code can be run outside the browser.
3. It is basically used on the client-side. It is mostly used on the server-side.
4. Javascript is capable enough to add HTML and play with the DOM. Nodejs does not have capability to add HTML tags.
5. Javascript can run in any browser engine as like JS core in safari and Spidermonkey in Firefox. Nodejs can only run in V8 engine of google chrome.
6. Javascript is used in frontend development. Nodejs is used in server-side development.
7. Some of the javascript frameworks are RamdaJS, TypedJS, etc. Some of the Nodejs modules are Lodash, express etc. These modules are to be imported from npm.
8. It is the upgraded version of ECMA script that uses Chrome’s V8 engine written in C++. Nodejs is written in C, C++ and Javascript.