Scopes and Hoisting in JavaScript
Hoisting is a behavior of JavaScript that moves the declaration of variable and function to the top of their respective scope.
As we know, let and const are block-scoped and variable is function-scope
blog.bipinbhatt.com.np3 min read