Interactive JavaScript exercises by topic.

Practice with focused coding challenges that run in your browser. Write a solution, run the tests, and use instant feedback to improve it.

Topic library

Choose a JavaScript exercise category.

Start with core language drills or focus on strings, arrays, objects, functions, scope, and browser interaction. Each live set shows its size and difficulty mix before you begin.

Foundations

Variables, conditions, and basic logic

73 exercisesbeginner focus22 premium
Start practicing

Strings

Text manipulation, methods, formatting, and parsing

29 exercisesmedium focus12 premium
Start practicing

Arrays

Indexing, array operations, iteration, and algorithms

26 exerciseseasy focus18 premium
Start practicing

Objects

Properties, nested data, and object patterns

20 exerciseseasy focus11 premium
Start practicing

Functions

Parameters, returns, callbacks, recursion, and composition

27 exerciseshard focus16 premium
Start practicing

Higher Order Functions

map, filter, reduce, and composing behaviour

56 exercisesmedium focus12 premium
Start practicing

Closures & Scope

Lexical scope, closures, and private state

20 exercisesmedium focus4 premium
Start practicing

DOM Manipulation

Element selection, events, rendering, forms, and browser APIs

80 exercisesmedium focus40 premium
Start practicing
Soon

Asynchronous JS

Promises, async/await, fetch, and timing

Promisesasync/awaitfetch
Coming soon

How it works

A focused way to practice JavaScript online.

These interactive JavaScript exercises keep the feedback loop short. Work on one concept at a time, check what your code actually does, and revise the parts that do not behave as expected.

  1. Choose one skill

    Start with fundamentals or jump directly to strings, arrays, objects, functions, scope, or DOM manipulation.

  2. Write real JavaScript

    Solve each coding challenge in the browser editor without setting up a local project or switching tools.

  3. Run tests and improve

    Use immediate test feedback to find incorrect assumptions, adjust your solution, and try again.

Skills you will use

What you will practice in these JavaScript exercises.

Build fluency with JavaScript fundamentals including variables, data types, operators, conditions, loops, and basic program logic. Then move into strings, arrays, objects, functions, callbacks, higher-order functions, scope, closures, and DOM manipulation.

These JavaScript coding exercises include practical tasks such as formatting text, transforming application data, validating values, writing reusable functions, debugging incorrect behaviour, responding to browser events, and updating page content. Each challenge asks you to produce working code and choose an approach that fits the result the program needs.

Where to start

Pick the practice that matches what you know.

You do not need to work through every category in order. Begin with the smallest gap in your understanding, then move into a nearby topic when the exercises start to feel familiar.

Common questions

JavaScript exercise FAQs.

What are JavaScript exercises?
They are focused coding challenges that ask you to read a task, write JavaScript, and check the result. They turn language concepts into decisions you can practice and repeat.
Are these exercises suitable for beginners?
Yes. The Foundations category begins with variables and values, then builds toward conditions, loops, functions, and everyday program logic.
Do I need to install anything?
No. Exercises run in the browser with an editor and test feedback. For unstructured experimentation, use the JavaScript sandbox.
Can I learn in a guided order instead?
Yes. The JavaScript courses provide a sequenced path with explanations, exercises, quizzes, and projects when topic-by-topic practice is not enough.

Prefer a path?

Want more structure than topic drills?

Follow a guided course when you want sequence, or build a project when you are ready to connect the pieces in one browser app.