Introduction to Hoisting in JavaScript
The JavaScript engine or interpreter when reading the script takes the variable declaration and function declaration to the top in memory, Initialisations are not hoisted.
π©βπ» Coding Time
Example - 1
console.log(a)
// var is hoisted means we can a...
vishal21121.hashnode.dev2 min read
Sohini Bhattacharjee
Budding engineer and a coding enthusiast
The concept of Hoisting is a hot topic for interviews. Well, for let and const there is a concept of the Temporal dead zone! Their hoisting is different and that's why many don't consider it as hoisting.