DEV Community

Discussion on: 🔥🕺🏼 JavaScript Visualized: Hoisting

Collapse
fahim04blue profile image
Shahriar Saleh Fahim

It results undefined because you have initialized the variable 'x' already but haven't defined the variable with any value. This is why it prints out undefined.