2. Generating output

2.1. Output to browser's console


          In debugging your codes, it is better to use the console.log() method. In this method, the output is not directly viewed in the browser. Instead, you need to right-click your browser and select “Inspect” or “Inspect Element” in some browser. This will open the developer tools Click the “Console” tab. In that tab, you will be able to check on your output. Take note that this tab will also display the errors that your code might encounter.

Sample Code:


Output: