Hoisting in Javascript π₯
Before I start explaining Hoisting, try to guess the output of the following code without running in the console -
console.log(x);
getName( );
function getName( ) {
console.log("John Doe");
};
var x = 5;
So the output would be -
console.log(x)...
badolla.hashnode.dev4 min read
Aditya Tiwari
Great read harshit!