# Lox playground

> Run Lox, the language from Crafting Interpreters, in your browser: a jlox port that passes the book's test suite, stopped at any chapter from 4 to 13.

The Lox playground runs Lox, the language from Crafting Interpreters, in your browser: a TypeScript port of jlox that passes the book's tests, stopped at any of 9 chapters from 4 to 13.

## Key facts {#key-facts}

- Chapters: 4 (Scanning), 6 (Parsing Expressions), 7 (Evaluating Expressions), 8 (Statements and State), 9 (Control Flow), 10 (Functions), 11 (Resolving and Binding), 12 (Classes) and 13 (Inheritance).
- Runs on your device; nothing you type is sent anywhere.
- Use it to check your own jlox: when the two disagree on a program, one of you has a bug.
- Updated October 20, 2026.

Open it at https://cracked.guide/lox.

## Check your own jlox against it {#check-your-own-jlox-against-it}

The engine is a TypeScript port of jlox that passes every test in the book's suite for chapters 4 to 13, with the same error messages and exit behavior. When your interpreter and the playground disagree on a program, one of you has a bug.

## The chapters {#the-chapters}

- [Chapter 4: Scanning](https://cracked.guide/guide/ci-04) (`chap04_scanning`)
- [Chapter 6: Parsing Expressions](https://cracked.guide/guide/ci-06) (`chap06_parsing`)
- [Chapter 7: Evaluating Expressions](https://cracked.guide/guide/ci-07) (`chap07_evaluating`)
- [Chapter 8: Statements and State](https://cracked.guide/guide/ci-08) (`chap08_statements`)
- [Chapter 9: Control Flow](https://cracked.guide/guide/ci-09) (`chap09_control`)
- [Chapter 10: Functions](https://cracked.guide/guide/ci-10) (`chap10_functions`)
- [Chapter 11: Resolving and Binding](https://cracked.guide/guide/ci-11) (`chap11_resolving`)
- [Chapter 12: Classes](https://cracked.guide/guide/ci-12) (`chap12_classes`)
- [Chapter 13: Inheritance](https://cracked.guide/guide/ci-13) (`chap13_inheritance`)

---

Source: https://cracked.guide/lox
cracked.guide: A free, dated 145-week path to getting genuinely cracked at programming.
