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
| Section | Time | Required? |
|---|---|---|
| Watch first + challenge setup | 15 min | ⚑ Required |
| Variables and Objects | 1 hr | ⚑ Required |
| Manipulating Objects | 1.5 hrs | ⚑ Required |
| FlipFlop (Super Edition) | 4 hrs | ⚑ Required |
| Gradebook | 4 hrs | ⚑ Required |
| Built-in Methods | 4 hrs | ⚑ Required |
| Stretch — JavaScript Olympics | 6 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.
| Part | What it covers | Time |
|---|---|---|
| Part 1 — Setup | Forking and cloning the repo, running npm install, and a tour of the folder structure | 4 min |
| Part 2 — Walkthrough | Running your first test, reading failing output, and making tests go green one by one | 8 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-katanpm 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-deskDiscord channel is there for this; you are not the only one working on these challenges
How to know you've nailed it
| Level | You can... | ||
|---|---|---|---|
| 🪨 | Intro Climb | Get all tests passing for Variables and Objects and Manipulating Objects | ⚑ Required |
| 🧗 | Core Ascent | Get all tests passing for all five required kata, with pseudocode comments showing your thinking | ⚑ Required |
| 🏔️ | Summit | Complete the JavaScript Olympics stretch challenge | ◎ Optional |