13 June, 2017
0 Comments
1 category
https://www.sitepoint.com/demystifying-javascript-variable-scope-hoisting
Things to Remember
- All declarations, both functions and variables, are hoisted to the top of the containing scope, before any part of your code is executed.
- Functions are hoisted first, and then variables.
- Function declarations have priority over variable declarations, but not over variable assignments.
Tags: Javascript
Category: Uncategorized