Multiple choice

What is the JavaScript syntax for printing values in Console?

  1. console.log(5);

  2. console.print(5);

  3. print(5)

  4. print.console(5);

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The standard method for writing messages or values to the web console in JavaScript is 'console.log()'. Other options like 'print()' or 'console.print()' are either incorrect or perform different actions (such as opening the print dialog).