In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces the differences between node.js and javascript, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.
Differences: 1, JavaScript is a scripting language, while Node.js is a development platform that allows JavaScript to run on the server; 2, JS is biased towards the front-end browser, node is biased towards the back-end; 3, the top-level object in JS is the window object, while the top-level object in node is the global object.
The operating environment of this tutorial: windows7 system, javascript1.8.5&&nodejs 12.19.0, Dell G3 computer.
JavaScript is an advanced, interpretive, literal scripting language. It is a prototype-based, function-oriented scripting language. It has been widely used in Web application development, often used to add a variety of dynamic functions to web pages, and provide users with more smooth and beautiful browsing effects.
Node.js is a JavaScript running environment based on Chrome V8 engine and a development platform that allows JavaScript to run on the server side.
The difference between node.js and javascript:
1. JavaScript is a scripting language, while Node.js is a development platform that allows JavaScript to run on the server.
2. Nodejs and JS are the same at the bottom, both are Ecmascript, but the extended functions are different. One is biased towards the front-end browser and the other is biased towards the back-end.
3. Different top-level objects
In the Ecmascript section, node and JS are actually the same, such as the definition of data types, syntax structures, and built-in objects. But the top-level object in JS is the window object, but there are no window objects in node, and the top-level object in node is the global object. This is the difference between the two.
In the window object, defining a global variable is accessible through Window, but not in node through the global object, such as:
Var axiom 100th console.log (global.a)
In this way, the output result is:
Undefined
For the above example, because the variable defined in node is an object in the module, not a global global variable, the result is undefined.
Thank you for reading this article carefully. I hope the article "what is the difference between node.js and javascript" shared by the editor will be helpful to you. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.