Get Programming with JavaScript - Listing 1.01

Listing 1.01 - Using console.log to display information

console.log("Hello World!");

Further Adventures

To change the text that is logged to the console, change the text between the quotation marks inside the parentheses.

Listing 1.01 - Using console.log - Task 1

console.log("My new message");

You can add as many console.log statements as you want.

Listing 1.01 - Using console.log - Task 3

console.log("My new message"); console.log("Hi there!");

When the program is run, each message will be displayed on the console.