title: jQuery each() closure - how to access outside variable
body: <p>What's the best way to access my this.rules variable from within $.each()? Any explanation of why/how would also be helpful!</p>
  
  <pre><code>app.Style = function(node) {
      this.style = node;
      this.rules = [];
      var ruleHolder = node.find('Rule');
  
      $.each(ruleHolder, function(index, value) {
          var myRule = new app.Rule($(ruleHolder[index]));
          this.rules.push(myRule);
      });
  
      console.log(this.rules)
  }
  </code></pre>