0%
Checking the code runner…

Instructions

Lesson 1 of 4

Hello, Console

In JavaScript, console.log() prints a message. It's the first tool every JavaScript developer reaches for:

Press Run to see the output. Statements usually end with a semicolon ;.

Comments

// starts a comment that lasts until the end of the line. /* ... */ can span several lines:

console.log() takes several values too, separated by commas:

console.log('Second', 'breakfast'); // prints: Second breakfast

Exercise: Greet the Shire

Write a program that prints exactly:

Hello, Shire!

Your turn!

Write your code in and press Submit answer.

  • program → Hello, Shire!

Help

Hint

Use console.log() with the text in quotes: console.log("Hello, Shire!");

Pass the exercise to complete this lesson.

Terminal
Press Run to see your output here.