Checking for duplicate strings in JavaScript array : <p>I have JS array with strings, for example:</p>

<p><code>var strArray = [ "q", "w", "w", "e", "i", "u", "r"];</code></p>

<p>I need to compare for duplicate strings inside array, and if duplicate string exists, there should be alert box pointing to that string.</p>

<p>I was trying to compare it with <code>for</code> loop, but I don't know how to write code so that array checks it`s own strings for duplicates, without already pre-determined string to compare.</p>
