Skip to content
All challenges
ProgrammingWrite codeBeginner3 min

Your first message

Skills: Strings · Values and types

Task

Write a program that prints exactly these two lines, in this order:

Hello, XYZ!
I am learning JavaScript.

Use console.log once for each line. Capital letters and punctuation must match.

Examples

Check solution runs these tests.

  1. Prints both lines in orderExample
    Expected output
    Hello, XYZ! I am learning JavaScript.

Every test, including the extra ones, is part of this page. Nothing is hidden or secret.

Your code

Loading the editor…

// Print the two lines here.
console.log("Hello");

Ctrl + Enter (⌘ + Enter on a Mac) runs the examples; add Shift to check. Tab indents; press Esc, then Tab, to leave the editor.

Run examples tries your code on the examples and records nothing. Check solution runs every test and saves an attempt.

Tests

Run your code to see which tests pass.

Console

What your code logs with console.log appears here.