title: JS remove last child?
body: <p>When I add a few of <code>&lt;select&gt;</code> ex. <code>SELECT_country, SELECT_country1,  SELECT_country2</code>
  I would like to remove them in the order of appearance from the newest one to oldest one. But it is removing from oldest one to newest one. I thought <code>SELECT_country</code> is <em>parent</em>, and I will be deleting its <em>child</em>, but the <em>parent</em> goes away first.</p>
  <p>How I can change it?</p>
  <pre><code>var j = 0;
  
  function add_country() {
      j++;
      var select = document.getElementById(&quot;SELECT_country&quot;);
      var clone = select.cloneNode(true);
      clone.setAttribute(&quot;id&quot;, &quot;SELECT_country&quot; + j);
      clone.setAttribute(&quot;name&quot;, &quot;country&quot; + j);
      document.getElementById(&quot;DIV_country&quot;).appendChild(clone);
  }
  
  function remove_country() {
      var select = document.getElementById('SELECT_country');
      select.parentNode.removeChild(select);
  }
  </code></pre>