DEV Community

loading...
Cover image for Hoisting in Javascript

Hoisting in Javascript

moni_coder profile image Moni ・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