Thoughts

mental health break ,./'"**^^$_---
Possibly my favorite Javascript feature is this:
```js function foo() { let x = 0; return { inc: function () { x++; }; get: function () { return x; } }; } const obj = foo(); obj.get(); // 0 obj.inc(); obj.get(); // 1 ``` And this is obviously an ugly shim for OOP-style encapsulation that isn't needed. But this is just illustrative of the most common use for this feature. And this feature isn't something that I normally use, or that is good practice to use. But if you couldn't do this in a language, it would just feel underpowered. (This does require functions to be passable by value, which similarly I think it very powerful.) (You actually can do this in Python 3, with the `nonlocal` keyword, fun fact.)
Link 4:30 p.m. Feb 07, 2022 UTC-5