How to check if all values of a given array are unique : <p>I need to write a function in JavaScript which would return a boolean after checking if all values of a given array are unique.
Examples</p>

<pre><code>[1,2,3,4] true
[1,2,1,4] false, since the array has value '1' twice
</code></pre>
