title: Javascript 'this' returning window instead of my object
body: <p>I am trying to understand why this is returning Window instead of my object. Looking at my previous examples this is working. I must be missing something obvious.<div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>(function($) {
    if (typeof a === "undefined" || a === null) a = {};
    if (typeof a.b === "undefined" || a.b === null) a.b = {};
    if (typeof a.b.c === "undefined" || a.b.c === null) a.b.c = {};
    if (typeof a.b.c.d === "undefined" || a.b.c.d === null) a.b.c.d = {};
    if (typeof a.b.c.d.e === "undefined" || a.b.c.d.e === null) a.b.c.d.e = {};
  
    a.b.c.d.e.MyObject = {
      method1: function() {
        console.log(this); //Returning Window
      },
  
      method2: function() {
  
      }
    }
  }(jQuery));</code></pre>
  </div>
  </div>
      </p>
  
  <p>This is being called via eval() from another JS file.</p>