Home >Web Front-end >Front-end Q&A >Does javascript need to build an environment?

Does javascript need to build an environment?

青灯夜游
青灯夜游Original
2021-04-01 16:43:374055browse

If you are running JavaScript code in HTML, you do not need to set up an environment; because JavaScript is a language that runs in the browser, you do not need to set up an environment, you only need a browser to run it. If you run the JS program directly, you need to download and install the node.js environment.

Does javascript need to build an environment?

The operating environment of this tutorial: Windows 7 system, ECMAScript version 5, Dell G3 computer.

JavaScript running environment configuration

1. Run in html

This kind of operation All you need is a document editor browser to run JS code.

Because JavaScript is a language that runs in the browser, there is no need to set up an environment, just the browser.

2. Run the JS program directly

You need to download and install the node.js environment, which is similar to python and java. At this time, running the JS program does not require the assistance of html and can be run directly.

For example, node xxx.js in cmd is enough, and environment variables also need to be configured.

For more programming related knowledge, please visit: Programming Video! !

The above is the detailed content of Does javascript need to build an environment?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn