fbpx

Explain the concept of hoisting in JavaScript.

  • Hoisting is the process of moving variable and function declarations to the top of their containing scope during compilation.
  • Variables declared with var are hoisted and can be used before declaration (but not initialized).
  • Function declarations are fully hoisted.

# Dream job to realty