In JavaScript: ```js function outer() { let count = 0; return function() { count++; console.log(count); }; } let counter = outer(); counter(); // 1 counter(); // 2 ``` This is called a **closure**: a function that "remembers" variables from its outer scope. It's like creating a custom behavior in LiveCode that holds on to local state between calls.