![]() ![]() Try to figure out which lines of code caused the browser to log the messages. querySelector ( 'h2' ), 'h2 not found!' ) įigure 1 shows what the Console looks like after loading the page and waiting 3 seconds. ![]() For example, suppose that you're in the process of writing the HTML and JavaScript for a page: Ĭonst h1 = document. When the browser executes your JavaScript and sees an expression like that, it knows that it's supposed to log the message to the Console. To log a message, you insert an expression like console.log('Hello, Console!') into your JavaScript. Web developers often log messages to the Console to make sure that their JavaScript is working as expected.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |