Context of JavaScript compare function of "sort"
<p>In my "class" method I use the JavaScript "sort" function plus a compare function:</p>

<pre><code>this.models.sort(this.comparator);
</code></pre>

<p>When the sort function calls my comparator, is it possible to define the context/"this" for 
the comparator?</p>

<p>I know it can be done this way:</p>

<pre><code>var self = this;
this.models.sort(function(a, b){return self.comparator.call(self, a, b);});
</code></pre>

<p>But does somebody know a simpler way?</p>

<p>Thanks alot in advance</p>
