In Javascript, how do I check if an array has duplicate values?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/840781/easiest-way-to-find-duplicate-values-in-a-javascript-array">Easiest way to find duplicate values in a javascript array</a>  </p>
</blockquote>



<p>How do I check if an array has duplicate values?</p>

<p>If more than 1 element of the same exist, then return true. Otherwise, return false.</p>

<pre><code>['hello','goodbye','hey'] //return false because no duplicates exist
['hello','goodbye','hello'] // return true because duplicaets exist
</code></pre>
