title: For each instance of array-item in string
body: <p>I am trying to check for each instance of all array-items in a string. Example;</p>
  
  <pre><code>var string = "aa bb ccc";
  var array = ["a", "b", "c"];
  </code></pre>
  
  <p>This should execute my code 7 times - once for each instance of any array-item being in the string. This is quite hard to explain, but I hope the example is enough.</p>
  
  <p>Another explained-code example;</p>
  
  <pre><code>$.each(ArrayItem in string) {
      //execute code
  }
  </code></pre>
  
  <p>I cannot get my head around this one, and haven't yet found anything that remotely works the way I want it to.</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I want to use this to add a price for each letter - say "a,b,c,d,e,f,g" costs $1, while the rest costs $2 - I would need to check for each instance of the array-items above in my string, and calculate the price.</p>