Level 3: Builder
Builder teaches JavaScript and the habits of a working developer, in 51 missions. It starts with values, variables, decisions and functions, then scope, closures and errors, then arrays, objects and the array methods used every day: map, filter, find, sort and reduce.
Last updated
What does Builder cover?
In the browser, learners change the page, respond to clicks and typing, handle forms, keep an app's state in one place, wait for data with async and await, and make requests with fetch. A unit on web APIs covers requests, responses, status codes, keys and what to do when an API is slow or fails.
The last unit moves to the learner's own computer: a debugging method, browser developer tools, the terminal, an editor and Node, npm, Git, and GitHub pull requests, including reviewing code that a person or an AI wrote. Anything that needs an account is done with a parent or teacher.
JavaScript: foundations
Values, variables, decisions and functions.
12 missions. By the end: A set of small working functions they wrote and tested.
Values and the console
Print numbers, strings and booleans to the console and check the type of each.
15 min
Variables
Store values in named variables with `const` and `let`, and build a sentence from them.
20 min
Maths and comparison
Do arithmetic with variables and compare values to get a true or false answer.
20 min
Making decisions
Use `if`, `else if` and `else` to make code do different things in different situations.
20 min
How your code runs
Trace a program by hand: the order lines run in, what each variable holds, and what the call stack is doing.
35 min
When types mix
Predict what JavaScript does when types mix, and compare values safely.
30 min
Functions: reusable steps
Write functions that take inputs and return a result.
25 min
Functions: arrows and scope
Write arrow functions with default values, and build one function out of another.
20 min
Scope and closures
Say where a variable can be seen from, and use a closure to keep a value private.
35 min
Errors: throwing and catching
Throw and catch errors, and write a function that fails clearly instead of quietly.
35 min
Working with text
Measure, clean, search, cut and rebuild strings with the built-in string methods.
25 min
Numbers, money and dates
Round money correctly, use the Math tools, and format numbers and dates for people to read.
35 min
Big build chapter, about 75 minutes
The toolkit
A file of small, tested functions that the rest of your big build will call.
JavaScript: working with data
Arrays, loops, objects and the array methods used every day.
11 missions. By the end: A program that filters, sorts and summarises a list of data.
Arrays
Create an array, read items from it by position, and add and remove items.
20 min
Loops
Repeat code for every item in an array or a set number of times, and say what makes a loop stop.
25 min
Objects
Describe a thing with an object, read and update its properties, and work through an array of objects.
25 min
References and copies
Explain why changing one array or object can change another, and copy data safely.
30 min
Unpacking and combining
Unpack and combine arrays and objects with destructuring, spread, optional chaining and default values.
35 min
map and filter
Use `map` to change every item in an array and `filter` to keep only some of them.
25 min
find, some, every, sort, reduce
Pick the right array method to find one item, ask a yes-or-no question, put a list in order or boil it down to one value.
30 min
reduce: total, count and group
Use reduce to total, count and group a list.
30 min
JSON and the shape of data
Turn data into JSON and back, work with nested data, and check that data has the shape you expect.
35 min
Classes and modules
Write a class with methods, and explain how a real project splits code into modules with import and export.
35 min
Project: a leaderboard
Build a leaderboard program that filters, sorts, summarises and formats a list of player objects.
30 min
Big build chapter, about 90 minutes
The list
Your world's data as an array of objects, with functions that filter, sort and summarise it onto the page.
JavaScript in the browser
Changing the page, responding to events, handling forms and loading data.
12 missions. By the end: An interactive app: a checklist or tracker that responds to the user.
Finding elements
Find elements on a page from JavaScript and read their text.
20 min
Changing the page
Change text, classes and attributes from JavaScript, and add new elements to a page.
25 min
Events
Run code when the user clicks or types, and use the event object to see what happened.
25 min
How events travel
Explain how an event travels through the page, handle many elements with one listener, and respond to the keyboard.
35 min
Forms and validation
Handle a form with JavaScript: stop the reload, read the values and show an error next to a field.
25 min
State and render
Keep an app's data in one place and redraw the page from it with a render function.
25 min
Remembering between visits
Keep data between visits with browser storage, and decide what must never be stored there.
30 min
Waiting for data
Load data that takes time to arrive using async and await, and show loading and error states.
30 min
The event loop and promises
Explain the event loop, write and chain promises, and run several tasks at once.
40 min
Requests with fetch
Make a request with fetch, read the status, headers and body, and handle every way it can fail.
35 min
Building, focus and announcements
Build many elements efficiently, move keyboard focus on purpose, and announce changes to screen readers.
35 min
Project: a kit checklist app
Build a checklist app where items can be added, ticked off, removed and counted, all rendered from state.
30 min
Big build chapter, about 100 minutes
The tracker
The first part of your big build that people can use: a tracker that responds to typing and clicks.
Web APIs
How programs talk to each other over the web: requests, responses, addresses, keys and errors.
6 missions. By the end: A page that reads and changes data through an API, and copes when the API is slow or fails.
Requests and responses
Read a web request and response: the address, the method, the status code, the headers and the body.
35 min
Addresses for things
Design and use addresses for listing, reading, creating, changing and deleting things, with filters and pages.
40 min
Who is calling
Explain how an API knows who is calling, why keys stay on the server, and what a cross-origin block means.
40 min
When the API lets you down
Handle slow, failing and rate-limited requests with timeouts, limited retries and clear messages.
40 min
Design your own API
Write the specification for a small API of your own: its addresses, inputs, outputs and errors.
35 min
Project: a kit list on an API
Build a page that lists, adds and removes items through an API, with loading, empty and error states.
40 min
Big build chapter, about 90 minutes
Live data: the build talks to an API
Live data: the tracker now loads and saves its list through an API, and copes when a request is slow, empty or fails.
Working like a developer
Debugging, browser tools, the terminal, an editor, Git and GitHub.
10 missions. By the end: Their own project in a Git repository on GitHub, built on their own computer.
Debugging method
Find and fix a bug by following a method instead of guessing.
20 min
Reading error messages
Read a JavaScript error message and say what kind of mistake it points to.
20 min
Browser developer tools
Open your browser's developer tools and use Elements, Console, Network and device mode to inspect a page.
20 min
The terminal
Move around folders, make a folder and read a path using typed commands.
20 min
An editor and Node
Set up a code editor and Node on your own computer and run a first npm script.
25 min
Packages and npm
Read a package.json, install and update a package, and judge whether a package is safe to depend on.
40 min
Git: saving versions
Save versions of a project with Git, write clear commit messages and keep the wrong files out.
25 min
Branches, merges and undo
Work on a branch, merge it, resolve a merge conflict and undo a commit safely.
40 min
GitHub: sharing and review
Push a project to GitHub and make a change through a branch and a pull request.
30 min
Checking code before it goes in
Use a linter and a formatter, read a diff, and review code a person or an AI wrote before accepting it.
40 min
Big build chapter, about 120 minutes
Your own repository
Your big build as a real project on your own computer, with a Git history and a home on GitHub.