title: Scope clarification in javascript
body: <p>Simple question.  Why do we have set <code>that = this</code>? If we dont, we are in the global scope...but why?</p>
  
  <pre><code>var myObj = {
  
      specialFunction: function () {
  
      },
  
      anotherSpecialFunction: function () {
  
      },
  
      getAsyncData: function (cb) {
          cb();
      },
  
      render: function () {
          var that = this;
          this.getAsyncData(function () {
              // this now refers to global scope....why?
              that.specialFunction();
              that.anotherSpecialFunction();
          });
      }
  };
  
  myObj.render();
  </code></pre>