title: How to use Javascript array.find() with two conditions?
body: <p>I need to check if any object in an array of objects has a <code>type: a</code> AND if another has a <code>type: b</code></p>
  
  <p>I initially did this:</p>
  
  <p><code>const myObjects = objs.filter(attr =&gt; attr.type === 'a' || attr.type === 'b');</code></p>
  
  <p>But the code review complained that <code>filter</code> will keep going through the entire array, when we just need to know if any single object meets either criteria.</p>
  
  <p>I wanted to use <code>array.find()</code> but this only works for a single condition.</p>
  
  <p>Is there anyway to do this without using a <code>for</code> loop?</p>