title: How to search for words that contain all the letters from the array?
body: <p>I have an array of words, for example -</p>
  <pre><code>   const array = [&quot;apple&quot;, &quot;apricot&quot;, &quot;avocado&quot;];
  </code></pre>
  <p>I want to look for the words that contain</p>
  <ol>
  <li>All the letters from the array</li>
  <li>to be in order.
  If I'm writing -</li>
  </ol>
  <pre><code>const L = [&quot;a&quot;, &quot;o&quot;, &quot;c&quot;];
     const out = arrayF.filter ((el) =&gt; L.every ((letter) =&gt; el.includes (letter)));
  </code></pre>
  <p>Although he is looking for me all the letters, but if for example I will write-</p>
  <pre><code>   const L = [&quot;a&quot;, &quot;a&quot;, &quot;a&quot;];
  </code></pre>
  <ul>
  <li>This's causing me some problems.</li>
  </ul>
  <ol>
  <li><p>Even if I searched 3 times for the letter a he will also find me the one who has only once the letter.</p>
  </li>
  <li><p>When I search according to -</p>
  </li>
  </ol>
  <pre><code>const L = [&quot;a&quot;, &quot;o&quot;, &quot;c&quot;];
  </code></pre>
  <p>He also finds me &quot;apricot&quot; even if the &quot;o&quot; after the &quot;c&quot;</p>
  <p>Regards</p>