Function Hoisting In JavaScript

When writing functions in Javascript it can be a little confusing. Hopefully by walking through a few examples we can see the nature of hoisting in Javascript to better understand it’s behaviour. In Javascript the following functions are hoisted: Notice how within the foo() function that there’s a return statement between the two bar() functions.… Continue reading Function Hoisting In JavaScript