purpose of this javascript test function
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/3911690/question-on-this-javascript-syntax-what-does-this-do">Question on this JavaScript Syntax (&ldquo;What Does This Do?&rdquo;)</a>  </p>
</blockquote>



<p>what is the purpose of this line of code: <code>/xyz/.test(function(){xyz;})</code>. I have seen it in many pieces of code, but never understood why it's there. What's its purpose? I know that it's a regex function and returns a boolean based on if a match was found.</p>
