Meet your console

Hello, world!

Lesson 1 of 20 · 5 min · Module 1: Values & first steps

Every developer starts somewhere. The console is a place to see messages from your code. Let’s introduce ourselves.

Start this lesson →

Free. No installation: you write and run the code in your browser, and it is checked automatically.

By the end, you’ll be able to…

  • Identify a string value
  • Call a function with an argument
  • Read the console output

The idea

Use console.log() to print a message. Put text inside quotes — programmers call this a string.

console.log("A small step, a big beginning.");

01Read the punctuation

console is an object that provides tools for displaying information. The dot selects its log function. Parentheses hold the value to display, and quotes mark the beginning and end of the string.

console.log("Ready to learn");
Output
Ready to learn

02Separate comments from instructions

A line beginning with // is a note for a person reading the code. It does not run. Put executable code on its own line after the starter comments.

Your turn

Print the exact message Hello, world! to the console.

What the checks look for

  • Prints Hello, world!
Try it in the editor →

Take this with you

A function call performs an action with the value you pass into it.

Learn JavaScript Foundations for free

20 short lessons with real code and instant checks.

See the whole course →