DEV Community

Cover image for Things you did not know about hoisting in Javascript!
kapeel kokane
kapeel kokane

Posted on

Things you did not know about hoisting in Javascript!

So you think you know javascript, right?

What do you think would be the output of this code snippet?

Question 1

it's 2

Stumped yet?

What about this question? What do you think is the output this time?

Alt Text

its undefined

Confused? Well, let us clear that confusion. Here's a short video that I created concisely explaining the concept:
https://www.youtube.com/watch?v=ncq_PE3T0WI&t=18s

Top comments (0)