Searching for possible errors in programming during development is called debugging
Debugging is a difficult task, but modern browsers come with an in-built debugger which made it easy to debug.
Built in debugging tools can be set on or off to display possible errors. Debugger can be set on or off using short cut key F12 and select console from menu.
If debugging support is available in browser, console.log() method is used to display information on console.
<!DOCTYPE html> <html> <body> console.log() method is used to display information in browser console. Keep console open to see output. <script> console.log(Math.random()); </script> </body> </html>
Debugging is activate in browser using pressing F12 key and select “console”.