title: Remove Selected Value in Dropdown List Using JavaScript
body: <p>I have an HTML list that I want to remove elements from as the user chooses. I've tried using this code from <a href="https://stackoverflow.com/questions/1085801/get-selected-value-in-dropdown-list-using-javascript">this thread</a> but my issue seems to be accessing the element.
  Here's my HTML:</p>
  
  <pre><code>&lt;div id="ShipPlacement"&gt;
  Ship:
  &lt;select name="shipSelec" id="shipSelec"&gt;
      &lt;option value="aircraftCarrier"&gt;Aircraft Carrier&lt;/option&gt;
      &lt;option value="battleship"&gt;Battleship&lt;/option&gt;
      &lt;option value="cruiser"&gt;Cruiser&lt;/option&gt;
      &lt;option value="destroyer"&gt;Destroyer&lt;/option&gt;
      &lt;option value="destroyer"&gt;Destroyer&lt;/option&gt;
      &lt;option value="submarine"&gt;Submarine&lt;/option&gt;
      &lt;option value="submarine"&gt;Submarine&lt;/option&gt;
  &lt;/select&gt;
  &lt;button type="button" onclick="placeShip()"&gt;Remove Selected Ship&lt;/button&gt;
  </code></pre>
  
  <p></p>
  
  <p>And here's my JavaScript:</p>
  
  <pre><code>$( document ).ready(function() {
     var shipList=document.getElementById('shipSelec');
  });
  function placeShip() {
    shipList.remove(shipList.options[shipList.selectedIndex].value;);
    shipList.remove(shipList.options[shipList.selectedIndex]);
    shipList.remove(shipList.options[selectedIndex]);
    shiplist.remove([shipList.selectedIndex])
  }
  </code></pre>
  
  <p>I have several instances of the <code>remove()</code> method but that none of them work.
  However, the best way I can convey my error to you is <a href="https://jsfiddle.net/fqg56kaj/1" rel="nofollow noreferrer">through JSFiddle</a>.</p>