DEV Community

loading...
Cover image for Hoisting in Javascript

Hoisting in Javascript

Moni
Front End Developer & YouTuber, I am passionate learner. Always ready to learn new things My Youtube channel : https://www.youtube.com/channel/UCzAnHkAdDC3bq2W32y3JRWg
・1 min read

Definition 
In JavaScript is a behavior in which a function or a variable can be used before declaration.

Types of Hoisting

Variable Hoisting : Only variable declared with var is hoisted (not let and const)

Function Hoisting : Only Simple functions is hoisted (not function expressions)

Discussion (0)

Forem Open with the Forem app