title: Knockout JS: foreach that increments by 2
body: <p>In Knockout JS, is it possible to do a <code>foreach</code> that increments by 2? Something similar to:</p>
  
  <pre><code>for (var i = 0; i &lt; array.length; i += 2) {
      // Do stuff
  }
  </code></pre>
  
  <p>The reason I'd like to do this is because the data that I need to loop through is an array rather than an object. Example: </p>
  
  <pre><code>viewModel = function () {
      this.facets = ["Sample", 100, "Sample 2", 200];
  }
  </code></pre>
  
  <p>But the data needs to be displayed like this:</p>
  
  <pre><code>&lt;ul data-bind="foreach: facets"&gt; &lt;!-- Can this foreach be incremented by 2? --&gt;
      &lt;li&gt;$data[$index]: $data[$index + 1]&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>