title: How to get a value out of a string by compare two strings in JavaScript?
body: <p>I think my question (above) is too broad. Let me try to explain here...</p>
  <p>Say I have 5 departments in a string:</p>
  <pre><code>&quot;Accounting ResearchDevelopment **InformationTech** System FrontOffice&quot;
  </code></pre>
  <p>and I have another string like this:</p>
  <pre><code>&quot;John is in **InformationTech** department&quot;
  </code></pre>
  <p>The value is <code>InformationTech</code> because this value matches in two strings.</p>
  <p>How do I get a value <code>InformationTech</code> out of those two strings with no or minimal for-loop?</p>