Scope Rooms
Function scope, global, static, closures with use, fn and $this.
0 / 7 levels · 0 / 21 ★Start playing ›
Scope Rooms
Every function call is a fresh, empty room with its own name tags. Nothing from outside comes in unless you bring it through the door: a parameter, global, or a closure's use. static is a drawer in the room that keeps its contents between visits.
Your rulebook
Finish a level to add its rule. Fill the book and you can explain all of this in an interview.
- 1Finish A fresh room to unlock this rule.
- 2Finish Through the door: parameter or global to unlock this rule.
- 3Finish The drawer that remembers to unlock this rule.
- 4Finish use packs a copy to unlock this rule.
- 5Finish use (&$x) carries a link to unlock this rule.
- 6Finish fn packs everything it uses to unlock this rule.
- 7Finish $this comes along to unlock this rule.