Hoisting In JavaScript
When a code block is executed in JavaScript, JavaScript scan all the variables inside the current scope and moves it to the top of the scope. This is called hoisting. Consider the below code:
a = 'Hello'
console.log(a); // Hello
var a;...
saurabhsuryavanshi.hashnode.dev1 min read