👉 Hoisting is a concept in computer science that refers to the process of lifting an object or variable from one location on a stack (a data structure) to another. This can be useful for several purposes, including:
1.
Stack Management
: In some programming languages and frameworks, hoisting allows you to safely access variables by their names rather than their labels.
2.
Memory Management
: It is used in the context of dynamic allocation, where a variable or function must be stored on the stack