title: Trying to understand a code construct in evercookie
body: <p>I've been trying to understand Samy Kamkar's evercookie code and he does at least one thing I simply don't understand. The relevant code can be seen online at <a href="http://code.google.com/p/beef/source/browse/trunk/modules/beefjs/lib/evercookie.js?spec=svn604&amp;r=604" rel="nofollow">http://code.google.com/p/beef/source/browse/trunk/modules/beefjs/lib/evercookie.js?spec=svn604&amp;r=604</a>.</p>
  
  <p>My question is about how this code sets <code>evercookie</code> itself. The relevant construct:</p>
  
  <pre><code>var evercookie = (function () {
    this._class = function() { 
        ... 
    }; 
    return _class;
  })();
  </code></pre>
  
  <p>I understand that <code>evercookie</code> is intended to be a constructor (despite not following the convention of capitalizing constructors) and I understand that <code>evercookie</code> is being set to the return of an anonymous, self-executing function. Unless I am more confused than I think I am, <code>evercookie</code> should be set to the value <code>_class</code> has in the scope of the outer (anonymous) function. What I <strong>don't</strong> follow: where does <code>_class</code> get a value? <code>_class</code> is not the same thing as <code>this._class</code>, and there is no other reference to <code>_class</code>.</p>