title: Can someone please explain this regex filtering of an array
body: <p>I'm filtering an array, and found a regex on here.
  I'm trying to understand this:</p>
  
  <pre><code>filterArray.filter(/./.test.bind(new RegExp(key, 'g')))
  </code></pre>
  
  <p>But I don't understand how the array tests it value against the regex or why you have to start with /./ instead of just writing the regex. And how does bind work in this case?</p>
  
  <p>EDIT: Key is just a string that I want to match, "hi" or "dog" or "anything really".</p>