What is Hoisting in JavaScript ?
Hoisting is the process where javaScript interpreter moves the declaration of functions, variables, classes, or imports to the top of their scope, prior to execution of the code. Only the declarations are hoisted, not the initialisations. This is not a…