Hoisting is JavaScript’s default behavior of moving declarations to the top of the current scope (script or function) before the code is executed.

Hoisting is JavaScript’s default behavior of moving declarations to the top of the current scope (script or function) before the code is executed.