Prehoisting
Prehoisting is a technique used in the field of software engineering, particularly in the context of JavaScript, to optimize the performance of code execution. It involves moving variable and function declarations to the top of their containing scope during the compilation phase, before the code is executed. This process is known as "hoisting."
In JavaScript, variable declarations using the var keyword are hoisted to the top of their function or
Function declarations are also hoisted to the top of their containing scope. This means that a function
Prehoisting is an important concept to understand when working with JavaScript, as it can affect the behavior