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...