title: JS Hint - don't make functions within a loop
body: <p>I can not get around JSHint's error message. Here is the loop I am using:</p>
  
  <pre><code>for (i = 0; i &lt; Collection.length; i += 4) {
      data.push({
          items : Collection.slice(i, i + 4).map(function(item) {
              return {
                  id: item[0],
                  title: item[1],
              };
          })
      });
  }
  </code></pre>