/// The variable that a `function` statement defines is initialized /// before any statements in that function are run. (That's the /// one difference between `function f(...) {...}` and `var f = function...`. /// This allows for "pyramid style", where the function's implementation /// summarizes its behavior before giving the details (the nested functions). function request() { $.get('request', callback); function callback(x) { log('received "' + x + '"'); } } request();