Gripon, John Adrian G. Bsit-601: Create A Simple HTML File With The Following Syntax. Use PTHTML As The File Name
Gripon, John Adrian G. Bsit-601: Create A Simple HTML File With The Following Syntax. Use PTHTML As The File Name
BSIT- 601
1. Create a simple HTML file with the following syntax. Use PThtml as the file name.
2. Then, create a JS file with the following code. Use the correct file name.
3. Run the HTML file on Google Chrome. If the steps above are done correctly, “Performance Task”
should be displayed.
4. Open the browser’s Developer Tools using CTRL + Shift + I or by clicking the Customize and Control
button on the top right of the browser > More tools > Developer tools.
6. Write the debugger statement in the console.log block in the PTscript.js file. Place it before calling the
function outer. Save the file.
7. Refresh the browser and screenshot the console. Explain how the console displayed such output.
- It did not display any of the statements from line 12 onward since I placed the debugger
statement before the console log block.
8. On the browser, click the Resume button (the blue triangle icon rotated to the right).
9. Look at the console and explain why the console displayed such output
- The outer function and Performance Task were once again shown on the console since I hit
resume, causing the codes to be executed.
10. Click line 15, the last line of the code. It is how a breakpoint is set. Refresh the page.
11. With the breakpoint on the 15th line, click the Resume button again. It will display the following:
12.Clicking the Resume button again will display the rest of the output. Try it.
17. What happens to the JavaScript code in the Developer Tools when the Step Over button is pressed?
The “console.log(outer());” is highlighted and in the console tab, it displays “before outer() call”
18. What happens to the console if the Step Over button is pressed two (2) additional times?
The console displayed the whole console log block and displayed the function again.
19. Reload the page and click the Step Over button once.
20. Now, click the Step Into button (next to the Step Over button) and list the highlighted words each
time the button is clicked.
21. Repeat the instruction above, but this time, click the Step Into button six (6) times and
provide the screenshot of the Developer Tools.