JAVASCRIPT IN PRACTICE

Modify the code

Unlock the goal - change locked code so it returns the expected value. Trains reasoning about conditions.

  • Conditions
  • Allowed changes
  • Expected result
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.

Warm-up

Unlock access

Modify the code so it returns GRANTED instead of DENIED.

Solve challenge → No login required
Warm-up

Build a script tag

String exercise: return exactly "<script>alert(1)</script>". The result is compared as text and is not executed. This is not a universal XSS test: execution depends on…

Preview challenge → Free account required to solve
Easy

Frozen Config

Freeze the flat config object with Object.freeze and return it. Tests check Object.isFrozen as well as content. Freezing is shallow: in general, nested objects are not…

Preview challenge → Free account required to solve

Ready for more?

Available challenges: 3.

See all challenges →

The full catalogue requires a free account.

How should you approach these challenges?

Code modification challenges teach you to achieve a specified result within explicit constraints. You practise understanding the relationship between conditions and outcomes, which helps when modifying an existing function rather than rewriting it.

Read the goal and editing constraints first. Trace which conditions lead to the expected result, then change the permitted code. Check value types and operation order: similar-looking expressions can behave differently.

Put it into practice: Unlock access →

Solve this challenge without creating an account.