I put together a handful of gists in order to dip my toes into functional programming and understand exactly how closures in both JavaScript and Ruby work.
A closure is a function that can be passed around in order to be called later. Its other property (the one that screws programmers up :) is the fact that the variable values persist from the time the function is created. It can then access the variables even after they lose scope/change values.
Closures in JavaScript: https://gist.github.com/45ba3ef454d9696d2bb5
Closures in Ruby: https://gist.github.com/4196841