Why is the word “this” so important in JavaScript? In the post: “Understanding Scope in JavaScript,” I covered the basics of how scope works when dealing with functions. Sometimes the words “scope” and “context” are used interchangeably, which only leads to confusion because they are not the same thing. In JavaScript, “context” refers to an
Associative Arrays in JavaScript
You may be finding conflicting information about associative arrays in JavaScript. Well, the answer is quite simple…. and then things start to get a little odd If you are frustrated because you have been getting different answers on this subject, I”ve got good news and bad news. The good news is, the answer is simple:
How to Create a Name-Spaced Object to Avoid Using Global Variables in JavaScript
Creating your own custom Object is a good way to keep the global name-space clean and write organized code with predictable results. Sometimes you may need variables that are available to every function in your script. While it is tempting to use global variables to achieve this kind of scope, doing so can cause unpredictable



