Hoisting in JavaScript?

Hoisting in JavaScript

In JavaScript, hoisting is a behavior where variable and function declarations are moved ("hoisted") to the top of their containing scope (either the global or function scope) during the compilation…