JAVASCRIPT IN PRACTICE

Program the output

Program the output - the reverse of "Predict the result": write code that prints exactly the given string to the console. Trains control over what reaches the output.

  • console.log
  • Text formatting
  • Line breaks
Preview the first challenge →

Solving requires a free account.

Selected challenges to get started

Pick a challenge and explore the rules through a concrete example.

Warm-up

Evens in one line

Write code that prints EXACTLY the target output.

Preview challenge → Free account required to solve
Warm-up

Greeting

Write code that prints EXACTLY the target output.

Preview challenge → Free account required to solve
Warm-up

1 to 5

Write code that prints EXACTLY the target output.

Preview challenge → Free account required to solve

Ready for more?

Available challenges: 5.

See all challenges →

The full catalogue requires a free account.

How should you approach these challenges?

JavaScript output challenges practise precise text construction and control over console.log output. Similar precision is useful for reports, exports and diagnostic messages where value order and separators matter.

Read the expected output as an exact text specification. Write code that prints the required values with the correct order, separators and line breaks. Remove extra debug messages before checking. Correct calculations are not enough if the output format differs.

Explore an example: Evens in one line →

Read the description without logging in. Solving requires a free account.