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 | Cloning the repo, creating your branch, 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: Clone the repo
Go to your cohort's repo: javascript-kata — select your cohort in the top-right corner of this page to see the link. On the repo page, click the green Code button and copy the SSH URL.
Clone it to your machine and navigate into it:
git clone <paste the SSH URL you copied>cd javascript-kata
Step 2: Create your branch
Use your full name in lowercase with a hyphen:
git checkout -b your-branch-name
Step 3: Install dependencies
npm install
Use git add, git commit, and git push origin your-branch-name regularly as you work through the kata — not just at the end.
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 |