How can I remove options with the same text from a select element?
<p>I have a select element that shows multiple options with the same text:   </p>

<pre><code> &lt;select name="tur" id="tur"&gt;
        &lt;option value="1"&gt;a&lt;/option&gt; 
        &lt;option value="2"&gt;a&lt;/option&gt;  
        &lt;option value="3"&gt;a&lt;/option&gt; 
        &lt;option value="4"&gt;a&lt;/option&gt;
        &lt;option value="5"&gt;b&lt;/option&gt; 
        &lt;option value="6"&gt;b&lt;/option&gt;  
        &lt;option value="7"&gt;c&lt;/option&gt; 
         &lt;option value="8"&gt;d&lt;/option&gt;          
          &lt;/select&gt;  
</code></pre>

<p>Using JavaScript, I would like to remove these duplicates so that only one of each is shown:</p>

<pre><code>&lt;select name="tur" id="tur"&gt;
        &lt;option value="1"&gt;a&lt;/option&gt; 
        &lt;option value="5"&gt;b&lt;/option&gt; 
        &lt;option value="7"&gt;c&lt;/option&gt;
        &lt;option value="8"&gt;d&lt;/option&gt;          
</code></pre>

<p>  </p>
