JAVASCRIPT IN PRACTICE

Understand JavaScript

Predict output, understand type conversions and work out the order of asynchronous operations.

  • Type conversion
  • Data flow
  • Execution order
Start the first challenge →

First challenge without login · Free

Selected challenges to get started

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

Medium

Truthy and default values

What does the code print? Compare boolean conversion with || and ??. Enter one line with | separators.

Solve challenge → No login required
Medium

Async Order

Analyze the Event Loop. What exactly will the console output?

Solve challenge → No login required
Warm-up

YYYY-MM-DD format

Match a date in YYYY-MM-DD format. Check the shape only: 4 ASCII digits, hyphen, 2 digits, hyphen, 2 digits. Do not validate the calendar; 2024-99-99 matches.

Preview challenge → Free account required to solve

Ready for more?

Available challenges: 57.

See all challenges →

The full catalogue requires a free account.

How should you approach these challenges?

JavaScript code analysis helps you understand an unexpected result before changing the implementation. You practise reasoning used in code reviews, debugging and explaining application behaviour to teammates.

Read the code one operation at a time and note intermediate values and their types. Separate immediate execution from scheduled work. For regex, encoded data and security tasks, first identify the rule you are checking, then look for an example that could disprove it.

Put it into practice: Truthy and default values →

Solve this challenge without creating an account.