DEV Community

Discussion on: Hoisting in JS

Collapse
 
nicklane profile image
Nicholas Lane

Whilst I generally understand how hoisting works on a surface level, I assume it's still good practice to define or initialise your variable before you try to access it?
Is hoisting a thing just to help code be interpreted despite there being some human error?