title: Grep vs Filter in jQuery?
body: <p>I was wondering about the differences between Grep and Filter :</p>
  
  <p>Filter : </p>
  
  <blockquote>
    <p>Reduce the set of matched elements to those that match the selector or
    pass the function's test.</p>
  </blockquote>
  
  <p>Grep : </p>
  
  <blockquote>
    <p>Finds the elements of an array which satisfy a filter
    function. The original array is not affected.</p>
  </blockquote>
  
  <p><strong>ok.</strong></p>
  
  <p>so if I do this in GREP :</p>
  
  <pre><code>var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];
  
  myNewArray= jQuery.grep(arr, function(n, i){
    return (n != 5 &amp;&amp; i &gt; 4);
  });
  </code></pre>
  
  <p>I could do also : </p>
  
  <pre><code> var arr = [ 1, 9, 3, 8, 6, 1, 5, 9, 4, 7, 3, 8, 6, 9, 1 ];
  
  myNewArray= $(arr).filter( function(n, i){
    return (n != 5 &amp;&amp; i &gt; 4);
  });
  </code></pre>
  
  <p>In both situations I still can access to the original array...</p>
  
  <p>so...where is the difference ?</p>