In the browser, they are connected directly to HTML and, once some page is downloaded - they are executed immediately.
React to the visitor, to process a mouse click, move the cursor, clicking on a keyboard, etc. Sends a request to the server and download data without reloading the page (this technology is called "AJAX").
Simple things done simply. Supported by all commonly used browsers, and is enabled by default.
By control of indent and symbols usage you can easily control the output view and modify it according to your needs.
Convenient and Easy parameterization