Home >Web Front-end >Front-end Q&A >How to format javascript
How to format JavaScript: 1. In the Chrome browser, open the Sources bar, find the JS file and click the curly braces; 2. Use "notepad" to format the JS file.
The operating environment of this article: windows7 system, Google87.0&&javascript1.8.5 version, Dell G3 computer.
How to format javascript?
Recommend two useful JS formatting tools
Tool 1:
Directly in the Chrome browser, F12, open the Sources bar, find the JS file, and click the curly brackets below.
Tool 2:
Use notepad to format JS files.
1. Download the jstool plug-in (https://www.sunjw.us/jstool/npp/), put it in the plugins location of the Notepad\installation directory, and restart to use it.
2. Plug-in-->JSTool-->JSFormat
## [Recommended:javascript Advanced Tutorial】
The above is the detailed content of How to format javascript. For more information, please follow other related articles on the PHP Chinese website!