title: How to match string to array of string
body: <p>I have array that contain strings</p>
  
  <p><code>commentArray ={ "words":[ "xyz", "abc", "random", "sample" ] }</code></p>
  
  <p>And I want to match string</p>
  
  <pre><code> var comment = "hello world ran"
  </code></pre>
  
  <p>What I'm doing is </p>
  
  <pre><code>commentArray.words.find(words =&gt; {
      if (comment.toLowerCase().includes(words.toLowerCase())) {
        return true;
      }
    });
  </code></pre>
  
  <p>it giving true because "random" contains "ran" but I want true only if matches whole string not characters.</p>