There are two situations where you need to install something to use JavaScript: 1. If you run it in HTML, you don’t need to install it. You only need a document editor (such as Notepad) and a web browser to implement JavaScript code. It is running; 2. If you want to run the JavaScript program directly, you need to download and install the "node.js" environment. At this time, running the JS program does not require the assistance of HTML and can be run directly.
The operating environment of this tutorial: Windows 10 system, JavaScript version 1.8.5, Dell G3 computer.
1. Run in html
This kind of operation only requires one document editor By using the browser, you can run JS code.
These are all included with the operating system, so basically you don’t need to install any software to develop JavaScript.
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.
Extended knowledge
Node.js is not an independent language, nor is it a JavaScript framework. Node.js is just a framework that allows JavaScript to run outside the browser. platform. It uses event-driven, asynchronous programming, and is designed for network services. It implements functions such as file systems, modules, packages, operating system APIs, network communications, etc. that Core JavaScript does not have or is incomplete.
What can Node do?
Websites with complex logic
Large-scale web applications based on social networks
web Socket website
TCP\UDP socket application
Command line tool
Interactive terminal program
Local application with graphical user interface
Unit testing tool
Client-side Javascript compiler
##Features of Node
The biggest feature of node is the use of asynchronous I\O and event-driven 【Related recommendations:javascript video tutorial, web front-end】
The above is the detailed content of Do I need to install anything to use javascript?. For more information, please follow other related articles on the PHP Chinese website!