# Crafting Interpreters, chapter 21

> Week 19 of the cracked.guide path: Ch 21: Global Variables; LeetCode: 2 NeetCode 150 problems; Play: start EXAPUNKS.

Week 19 of 145 on cracked.guide, in Crafting Interpreters: Crafting Interpreters 21: Global Variables, 2 NeetCode 150 problems and Play track: EXAPUNKS. The reading guides budget about 5 hours.

## Key facts {#key-facts}

- [Crafting Interpreters 21: Global Variables](https://cracked.guide/guide/ci-21): Statements and global variables in clox: print and expression statements, declarations, global variable get and set via the hash table, and assignment with correct precedence.
- Phase: Crafting Interpreters, weeks 1 to 28.
- Updated October 20, 2026.

## By the end of this week you can {#objectives}

- Implement print, expression and var statements in clox's compiler.
- Explain how canAssign rejects invalid targets like `a * b = c`.
- Trace OP_DEFINE_GLOBAL, OP_GET_GLOBAL and OP_SET_GLOBAL through the globals table.

## This week's tasks {#tasks}

- [Crafting Interpreters chapter 21, Global Variables](https://cracked.guide/guide/ci-21): about 5 hours
- LeetCode: 2 NeetCode 150 problems
- Play: start EXAPUNKS: Read the first zine and solve the first 3 puzzles

Previous: [Week 18](https://cracked.guide/curriculum/week/18) · Next: [Week 20](https://cracked.guide/curriculum/week/20)

---

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