Javascript Developer JSE 40 01 · Free Practice Question Easy

Question 22

Q302 - Basics


The JavaScript code includes the

console.log("http://test.org"); command.

Its executions will:


  • A

    display on the console information about the loading progress

    of the http://test.org page loading.

  • B

    send a log with information about the currently executed script

    to the indicated address http://test.org

  • C

    display the following message on the console: http://test.org

  • D

    cause the page http://test.org to be loaded into the browser.

Reveal correct answer

Correct answer: C

Explanation

Topic: console.log()


Try it yourself:


Explanation:

The log() method writes (logs) a message to the console.

https://www.w3schools.com/jsref/met_console_log.asp


(There is a similar question Q202.)


Q302 (Please refer to this number, if you want to write me about this question.)

A. The console.log() function only logs messages to the console and does not provide information about the loading progress of any external page. It is used for debugging and displaying messages in the console.

B. The console.log() function does not send any logs to external addresses. It is used to log messages to the console within the browser's developer tools for debugging purposes.

C. The console.log() function in JavaScript is used to log messages to the console. In this case, it will display the message "http://test.org" on the console.

D. The console.log() function does not load any pages into the browser. It is specifically used for logging messages to the console, not for loading URLs.

Discussion

Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.

You must be logged in to post a comment.

Preparing For

Your Certification?

255+ certifications
Detailed explanations
Free PDF samples

Has All The Questions You Need