- It gives the user more control over the browser.
- It has ability to detect the user's browser and OS, it also allows the script to perform platform-dependent operations, if necessary.
- It can perform simple computations on the client side.
- It can enable the browser to perform input validation, on making a mistake in the input the user can see the message immediately instead of waiting for a server response.
- It can handle date and time.
- Text Editor to write code: Notepad ++, Komodo Edit or any other text editor
- Web Browser to display web pages: Google Chrome, Mozilla Firefox etc
- Writing into an HTML element, using innerHTML.
- Writing into the HTML output using document.write().
- Writing into an alert box, using window.alert().
- Writing into the browser console, using console.log().
It is convenient to use document.write() for testing purposes.
An alert box is generally used to display data as an alert in the browser.
Console.log() is used to display data in the console of the browser. This method is resourceful especially in debugging.