JavaScript Kata — Challenges

The Big Idea

Kata are small, focused coding challenges — borrowed from martial arts, where repetition builds form. Your job is to write code that makes pre-written tests pass. Each kata builds on the last, so work through them in order.

Your Roadmap

SectionTimeRequired?
Watch first + challenge setup15 min⚑ Required
Variables and Objects1 hr⚑ Required
Manipulating Objects1.5 hrs⚑ Required
FlipFlop (Super Edition)4 hrs⚑ Required
Gradebook4 hrs⚑ Required
Built-in Methods4 hrs⚑ Required
Stretch — JavaScript Olympics6 hrs◎ Optional

Watch first

JavaScript Kata Walkthrough — 2 parts

The embedded player above contains both parts — it will move to the next part automatically when each one ends.

PartWhat it coversTime
Part 1 — SetupForking and cloning the repo, running npm install, and a tour of the folder structure4 min
Part 2 — WalkthroughRunning your first test, reading failing output, and making tests go green one by one8 min

Prefer to watch on YouTube? Open the full playlist here.


Setup

Step 1: Fork the repo

Go to https://github.com/dev-academy-foundations/javascript-kata and click Fork to create your own copy.

Step 2: Clone your fork

git clone git@github.com:YOUR-GITHUB-USERNAME/javascript-kata.git

Step 3: Install dependencies

cd javascript-kata
npm install

How the tests work

The tests are already written. Your job is to write the code that makes them pass.

To run the tests for a specific kata:

npm test 1-variables-and-arrays

Replace 1-variables-and-arrays with the folder name for the kata you are working on.

Error messages are useful. They point you to the exact line number where something is failing. Read them carefully — they tell you what the test expected and what it actually received.

Show problem-solving tips for when you get stuck
  • Read the error message fully — it usually tells you exactly what failed and where
  • Use console.log() — print values at key points to see what your code is doing
  • Pseudocode first — write comments describing your plan before writing the code
  • Rubber ducky — explain the problem out loud; the act of explaining often reveals the solution
  • Break it down — solve the smallest sub-problem you can, then build up
  • Check in with your cohort — the foundations-help-desk Discord channel is there for this; you are not the only one working on these challenges

How to know you've nailed it

LevelYou can...
🪨Intro ClimbGet all tests passing for Variables and Objects and Manipulating Objects⚑ Required
🧗Core AscentGet all tests passing for all five required kata, with pseudocode comments showing your thinking⚑ Required
🏔️SummitComplete the JavaScript Olympics stretch challenge◎ Optional