Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Under what environment can javascript run?

2025-03-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

In this article, the editor introduces in detail the "javascript can run in what environment", the content is detailed, the steps are clear, and the details are handled properly. I hope this "javascript can run in what environment" article can help you solve your doubts.

Operating environment: 1, browser running environment, JavaScript in browser environment is mainly composed of ECMAScript, DOM and BOM; 2, "Node.js" running environment, "node.js" based on ECMAScript so that JavaScript can run on the server side.

The operating environment of this tutorial: windows10 system, javascript1.8.5 version, Dell G3 computer.

In which environments can javascript be run

JavaScript has two operating environments:

One is the browser running environment.

One is the Node.js running environment.

Browser running environment

Under the browser environment, JavaScript is mainly composed of three parts, namely, ECMAScript, DOM and BOM.

JavaScript was born with the birth of the browser, so the execution of JavaScript is mostly within the browser environment. However, the concept of JavaScript as a server-side script existed at the beginning of its birth. Netscape put forward the concept of server-side JavaScript in 1995, and developed Netscape Enterprise Server;, which was released by Microsoft in 1996. JScript can also run on the server side.

Unlike other compiled languages such as C language, JavaScript runs directly on the operating system after compilation, because it is a scripting language, and the runtime must run with the help of an engine (interpreter), so it can run in an environment with an encapsulated engine. Environments encapsulated with JavaScript engines can be divided into two categories: browser environments and non-browser environments, such as Node.js and MongoDB.

Node.js operating environment

On the basis of ECMAScript, Node.js extends the operation of Imax O, file operation, database operation and so on.

JavaScript is defined as a browser scripting language, and its running environment has always been a client browser, because the original intention of JavaScript design is to do some browser-user interaction and some web page special effects to supplement the shortcomings of HTML and CSS.

In 2009, node.js technology was born, and node.js is a Javascript runtime environment (runtime). In fact, it encapsulates the Google V8 engine. Node.js is a platform based on Chrome JavaScript runtime, which is used to build network applications with fast response and easy expansion.

Node.js enables JavaScript to run on the server side as a server scripting language, similar to dynamic languages such as php.

After reading this, the article "in what environment can javascript run" has been introduced. If you want to master the knowledge points of this article, you still need to practice and use it yourself to understand it. If you want to know more about related articles, welcome to follow the industry information channel.

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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report