DEV Community

Cover image for Hoisting in Javascript

Hoisting in Javascript

Front End Developer & YouTuber, I am passionate learner. Always ready to learn new things My Youtube channel :
・1 min read

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