O'Reilly logo
  • Harit Himanshu thinks this is interesting:

The function bar() has lexical scope access to the inner scope of foo(). But then, we take bar(), the function itself, and pass it as a value. In this case, we return the function object itself that bar references.

From

Cover of You Don't Know JS: Scope & Closures

Note

This is important point to understand here