title: Get result length of Array.prototype.some()
body: <p>I have a conditional which is checked via <code>Array.prototype.some()</code>. Considering this array:</p>
  
  <pre class="lang-js prettyprint-override"><code>const coolArray = [
    { isCool: false },
    { isCool: false },
    { isCool: true }
  ]
  
  const isCool = coolArray.some(item =&gt; item.isCool === true)
  
  if (isCool) {
    console.log("hello I'm cool!")
  }
  </code></pre>
  
  <p>However, I wanted that the check to happen when <code>item.isCool</code> is <code>true</code> <strong>and</strong> at least two items in the array match the condition. So the example above would not output the message, as there is only one <code>true</code> condition.</p>
  
  <p>On <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/some#Syntax" rel="nofollow noreferrer">MDN</a> the reference for this method is <code>arr.some(callback(element[, index[, array]])[, thisArg])</code>. However <code>[, array]</code> reference the original array instead of their clone, so doing the below outputs the same result:</p>
  
  <pre><code>const isCool = coolArray.some((item, index, arr) =&gt; {
    return item.isCool === true &amp;&amp; arr.length &gt; 1
  })
  </code></pre>
  
  <p>I'm aware I could avoid <code>.some()</code> and iterate over the array using <code>map</code> or <code>for</code> and save in an external array the results so I could check the length, something similar to:</p>
  
  <pre><code>const isCoolArr = []
  coolArray.map(item =&gt; item.isCool ? isCoolArr.push(item) : false)
  console.log('expected result:', isCoolArr.length) // outputs 1
  </code></pre>
  
  <p>But I'm not particularly happy with this method and looking for simpler alternatives. Can <code>.some()</code> fit what I need or do I need another alternative? Are there any, other than the case I mentioned above?</p>