title: In Javascript, how do I check if an array has duplicate values?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://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 some elements in the array are the same, then return true. Otherwise, return false.</p>
  
  <pre><code>['hello','goodbye','hey'] //return false because no duplicates exist
  ['hello','goodbye','hello'] // return true because duplicates exist
  </code></pre>
  
  <p>Notice I don't care about finding the duplication, only want Boolean result whether arrays contains duplications.</p>