title: To do list with Javascript : can't delete item
body: <p>I made the <code>remove item</code> button with the js code while doing the <code>to-do</code> list project.</p>
  
  <p>removing items which are earlier made in Code editor works well.
  <code>*so in browser preview, I typed and added "new To-do" item to list.*</code>
  but removing "new To-do" item doesn't work. even chrome Devtool shows no error.  new item's tag and className is all correct. </p>
  
  <p>p.s : don't need to worry about 'X' or X icon. I skipped for uploading.</p>
  
  <p>[HTML]</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;ul id="listUl"&gt;
      &lt;li&gt;Meet George &lt;span class="remove"&gt;&lt;/span&gt;&lt;/li&gt;
      &lt;li&gt;Pay Bills &lt;span class="remove"&gt;&lt;/span&gt;&lt;/li&gt;
      &lt;li&gt;new To-do &lt;span class="remove"&gt;&lt;/span&gt;&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>[JS] - removing part.</p>
  
  <pre class="lang-js prettyprint-override"><code>var remove = document.getElementsByClassName('remove');
  
  for (var i = 0; i &lt; remove.length; i++) {
      remove[i].onclick = function() {
          var target = document.getElementById('listUl');
          target.removeChild(this.parentElement);
      }
  }
  </code></pre>