Javascript function scoping and hoisting
Function hoisting means that functions are moved to the top of their scope. That is, function b() { a = 10; return; function a() {} } will be rewritten by the interpeter to this function b() { function a() {} a = 10; return; } Weird, eh? Also, in this instance, function a() {} behaved … Read more