JavaScript Closure Explained

Normally JavaScript functions can’t remember things. They’re just processes that eat inputs and poop outputs. In, out, gone. No trace left in them. If you were to ask them to personally keep count of the number of times they’ve executed, they would stare back at you with blank, sad eyes.

While closure, simply put, is a JavaScript function that carries its own persistent, private variables [1][2].

Continue reading


Remapping Keys in Sierra

Because of my use of VIM, ESC is much more useful to me than the more easily accessible CapsLock. I’ve always used Seil to switch them, until it started to fail in the new MacOS, Sierra.

After a bit of search, Karabiner solved my problem wonderfully.