title: Filter results to based on specific index
body: <p>I'm new to ES6 and ReactJS. I need some help to filter out the results in array, in a way, where I can check if the index matches, only then call the function <code>createOptions()</code>.</p>
  
  <p>Actual code :</p>
  
  <pre><code>const newArr = items
      .filter(this.isEligible(selectedIndex))
      .filter((item, index) =&gt; this.createOptions(item, index, selectedItem));
  </code></pre>
  
  <p>Need something like(expected)):</p>
  
  <pre><code>const newArr = items
      .filter(this.isEligible(selectedIndex))
      .filter((item, selectedIndex) =&gt; selectedIndex || selectedIndex+ 2 ? this.createOptions(item, selectedIndex, selectedItem));
  </code></pre>
  
  <p>Here, I need to filter out the results when the <code>index</code> equals <code>selectedIndex</code> or <code>selectedIndex+2</code>, then call <code>createOptions(item, index, selectedItem);</code></p>
  
  <p>But, I'm getting some syntax error while trying to do that. 
  Could you please help me fix that? </p>