CodingNeed.

1 · First steps · 6 MIN

Your first instruction

A program is a sequence of instructions.

The computer executes your instructions in order. console.log displays a value so you can observe what happened. Text goes inside matching quotes. The console shows the result; it does not change your code.

A recipe has separate steps. A program works the same way: start with one clear instruction.

Read the example

console.log("Hello, learner!");
Check the expected output
Hello, learner!

Your challenge

Write solve(input) to return a greeting for any name: "Hello, " followed by the name and "!". Return the string instead of logging it.

Common trap

Without quotation marks, JavaScript treats a word as a variable name.

Next lesson: Give values a name →

Essential cookies keep your account signed in. Optional analytics is not configured on this site. Your choice does not affect access to lessons.

Read the Privacy Policy. You can change this choice in the footer.