-2

Does console.log work in Javascript? I mean for producing output on screen like:

console.log("Hello World!")

2 Answers2

0

To produce an output on the screen, as I understand you to mean, one would use the alert() command to produce a pop-up; the console.log() command is used to send data to the console, which is not shown to the viewer by default.

Conor O'Brien
  • 987
  • 2
  • 16
  • 40
0

You need to open the console to see the log. Press F12 or Ctrl+Shift+J.

karolba
  • 956
  • 10
  • 19