JAVASCRIPT IN PRACTICE

Write and improve code

Write functions, fix bugs and test your solutions. Practice reading code and solving problems.

  • Functions
  • Debugging
  • Tests
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

Is it even?

For integer n, return a boolean: true if n is even, otherwise false. Zero and negative even integers also return true.

Solve challenge → No login required
Warm-up

Unlock access

Modify the code so it returns GRANTED instead of DENIED.

Solve challenge → No login required
Easy

Product limit: zero is a setting

An admin panel reads a product limit from an API. Return fallback only when value is null; the JS function should also handle undefined, which JSON fixtures cannot…

Solve challenge → No login required

Ready for more?

Available challenges: 159.

See all challenges →

The full catalogue requires a free account.

How should you approach these challenges?

JavaScript coding exercises combine writing functions, fixing bugs and checking results with tests. They give you practice with small pieces of application logic, such as processing API data or working with arrays.

Start with the contract: what does the code accept and what should it return? Trace a simple example, implement a solution and run the tests. Check empty inputs, zero and boundary values too. If a test fails, compare the expected and actual results and fix the specific cause.

Put it into practice: Is it even? →

Solve this challenge without creating an account.