Wouldn't this have a performance issue since the nested function is being redeclared every time the outer function is called?
EDIT: took out function hoisting stuff, it doesn't get hoisted after a quick check.
Check out the performance of these three styles. #1 and #3 are almost identical, #2 is significantly faster: http://jsperf.com/closures-perf