JavaScript Function Scope Explained
I am currently reading the MEAP of John Resig’s (@jeresig) Secrets of the JavaScript Ninja and one of the things that many beginners and even intermediate JavaScript developers do not understand completely, is the different ways in which functions can be defined and how scope differs depending on how you defined your function.
It is absolutely essential to grasp this concept as it opens many doors for the developer once this is understood. Whilst reading the above title I myself finally …