Correct Answer: A
console.log() in browser-side JavaScript writes output to the browser's JavaScript console, which is available in the browser's Developer Tools.
In a typical browser (Chrome, Firefox, Edge, etc.), you open DevTools and go to the Console tab.
Any console.log("Page has loaded!"); executed in page JavaScript will appear there.
Why A is correct:
The function onLoad is a client-side function (runs in the browser).
When it executes, the console.log call goes to the browser's JavaScript console, not the server.
Why the others are incorrect:
B . On the terminal console running the web server
That console shows logs from the server-side runtime (e.g., Node.js logs).
This code is clearly browser-side JavaScript (no Node.js or server context shown).
Therefore, the output does not appear in the terminal.
C . In the browser performance tools log
Performance tools (Timeline, Performance tab, etc.) show metrics about rendering, CPU time, network, etc., not generic console.log messages.
console.log messages appear in the Console tab, not in performance logs.
D . On the webpage console log
There is no built-in concept of a "webpage console log" UI rendered on the page itself by default.
Unless you explicitly code something to display logs in the DOM, console.log output is not visible on the page, only in Developer Tools.
Therefore, the correct place to see that log is:
Answe r: A
JavaScript knowledge / Study Guide references (concept names only, no links):
Browser Developer Tools - Console tab
console.log() in client-side JavaScript
Difference between client-side logs and server-side logs