DEV Community

Discussion on: Too quick, What hoisting really is ?

Collapse
 
snehag_07 profile image
Sneha

Why did the variable logged as undefined?

Collapse
 
wassimbj profile image
Wassim Ben Jdida

because before the javascript engine starts executing your code it sets up a memory space of all the variables in your code as "undefined", thats hoisting.