What is console.log?

前端 未结 22 2319
面向向阳花
面向向阳花 2020-11-22 00:41

What is the use of console.log?

Please explain how to use it in JavaScript, with a code example.

22条回答
  •  广开言路
    2020-11-22 01:19

    An example - suppose you want to know which line of code you were able to run your program (before it broke!), simply type in

    console.log("You made it to line 26. But then something went very, very wrong.")
    

提交回复
热议问题