Function Expression itself cannot assign Name to another Value
In the code below: (function (){ function test(){};//"function" var test;//"undefined" var printTest = typeof test; document.write(printTest); })(); printTest will display "function" instead of "undefined", which makes sense since from my understanding, any variable declarations are always "hoisted" to the top of the execution context (which in this case is function execution context) This makes the function declaration "test()" to be the one that appears later in the current execution context. Now consider this code where I actually assign a value to var declaration "var test =1". (function (