title: Match one of the elements of an array in a string using javascript
body: <p>I'm trying to create a function that returns true if at least one of the elements of a string array is found within another string.</p>
  
  <pre><code>function findInString(str) {
      var fruits = ["orange", "banana", "grape"];
  
      for(var i = 0; i &lt; fruits.length; i++) {
          if (str.indexOf(fruits[i]) &gt; -1) {
              return true;
          }
      }
  
      return false;
  }
  
  var a = findInString("I love orange juice."); //=&gt; returns true
  var b = findInString("I don't like peach."); //=&gt; returns false
  </code></pre>
  
  <p>This function does the trick, but I'm sure there might some array or string method that does the same without having to loop through the array. Any ideas?</p>
  
  <p>Thanks.</p>