Freshman Year
Asynchronous JavaScript
Three lessons, then a test against Buggsy.
What you’ll learn
- Synchronous code runs line by line, waiting for each. Asynchronous code starts a slow task and carries on.
setTimeout(fn, ms)runsfnonce later;setInterval(fn, ms)repeats untilclearInterval(id).- Callbacks inside callbacks become the pyramid of doom.
- A Promise is an IOU for a future value: pending, then fulfilled or rejected. Use
.then,.catch,.finally. asyncfunctions always return a promise;awaitpauses until a promise settles. Handle errors withtry…catch.Promise.all([…])runs things in parallel and waits for all of them.const res = await fetch(url); const data = await res.json();and checkres.ok!- The event loop: synchronous code first, then promise callbacks (microtasks), then timers.
The lessons
- Timers and callbacks Synchronous vs asynchronous, setTimeout, setInterval and the pyramid of doom.
- Promises, async and await An IOU for a future value, and code that reads like a story.
- Parallel, fetch and the event loop Promise.all, getting data from the internet, and how it all works.
Sophomore Year
Classes and objects
Three lessons, then a test against Buggsy.
What you’ll learn
- A class is a blueprint;
new ClassName()builds an instance.constructorsets it up. instanceofchecks which class made an object.getandsetmake properties that run code.staticbelongs to the class itself.#privatefields can only be used inside the class.class Dog extends Animalinherits;super(…)calls the parent’s constructor or methods.thisrules: a method call uses the object before the dot;newmakes a new object; a plain call isundefined; arrows borrowthisfrom outside.- Classes are a nicer way to write prototypes, which is what JavaScript uses under the hood.
The lessons
- Your first class Blueprints, constructors, methods and instanceof.
- Getters, statics, privates and inheritance Smarter properties, class-wide data, secrets and family trees.
- The mystery of this The four rules of this, bind, and prototypes under the hood.
Junior Year
Modules, Node.js and tools
Three lessons, then a test against Buggsy.
What you’ll learn
- Modules split code into files.
exportshares;importbrings things in. - Named exports:
export function add() {}→import { add } from "./math.js". Default:export default App→import App from "./app.js". - In the browser:
<script type="module" src="main.js">. - Node.js runs JavaScript outside the browser:
node app.js. node:fs/promisesreads and writes files;process.argvholds command-line arguments.- npm installs packages.
package.jsonlists them;node_modulesholds them (don’t share it);npm runruns scripts. - Tests check your code automatically. Git saves your history; linters and formatters keep code tidy.
The lessons
- Modules Split your code into files with export and import.
- Node.js: JavaScript everywhere Run JavaScript on your computer, read files and take arguments.
- npm, tests and the pro toolbox Packages, scripts, automatic tests, Git and friends.
Senior Year
Building real apps
Three lessons.
What you’ll learn
- Plan first: what should the app do? Sketch the screens, list the data, then build in small steps.
- The state + render pattern: keep all important data in variables (the state), write a
render()that draws the page from it, and after every change, update the state and callrender()again. - Keep logic in small, testable functions that don’t touch the page.
- Save the state with
localStorageso it survives a reload. - You know enough JavaScript to build real apps: to-do lists, quizzes, weather apps, games. Go build!
The lessons
- Planning a project How professionals turn an idea into an app, step by step.
- Project: Tasky, the to-do list Add, finish, delete and filter tasks, with logic you can test.
- Projects: quiz show and weather app Game logic, fetching live data, and where to go next.
Class starts whenever you’re ready
Every lesson is free, there’s nothing to sign up for, and your progress saves as you go.