Hoisting in JavaScript

What is Hoisting? Hoisting is when the JavaScript interpreter moves all variable and function declarations to the top of the current scope. Hoisting is done during the interpreter’s first run through the code. The important thing is that the actual declarations are hoisted, and that assignments will be left where they are. Hoisting is a … Read more