title: JavaScript delete array[i] -- runs great in OSX but won't run in Windows?
body: <p>I'm building a listbuilder app in vanilla JavaScript, and it's working on my macbook, but not on my PC. </p>
  
  <p>What difference between Mac and PC am I missing? </p>
  
  <p>The specific error in question is values aren't being deleted from my array in Windows. I'm not getting a Chrome or Firefox console error from Windows, but the "delete" function isn't removing the values from the array. Instead, it removes the LI from the HTML, but the targeted array value's LI reappears whenever a new entry is made and the unordered list is redrawn.</p>
  
  <p>I've run the code through Firefox and Chrome on my mac and my PC, and updated the browsers as well. </p>
  
  <p>The functionality I'm trying for is allowing the user to create a LI on the DOM by adding a value to an array, and then to remove both this LI and the array value by clicking on the LI.</p>
  
  <p>My HTML:
          </p>
  
  <pre><code>    &lt;div&gt;
          &lt;h2&gt;Enter your Input!&lt;/h2&gt;&lt;input class="feedback-input" id=
          "entryBox" placeholder="Type anything!" type="text"&gt; &lt;button id=
          "addEntry" onclick="addEntry()"&gt;Add your Entry&lt;/button&gt;
      &lt;/div&gt;
  
      &lt;div id="outputBox"&gt;
          &lt;ul id="outputList"&gt;&lt;/ul&gt;
  
          &lt;p&gt;Click list item to remove&lt;/p&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My JavaScript:</p>
  
  <pre><code>var output = document.getElementById("outputList");
  var list = [];
  var entry = {};
  
  function addEntry() {
    input = document.getElementById("entryBox").value; //Reads value from form
    document.getElementById("entryBox").value = ""; //Clears entry box for new text
    list.push(input);
    while (outputList.firstChild) //clearing the old displayed list 
    {
      outputList.removeChild(outputList.firstChild);
    }
  
    for (i = 0; i &lt; list.length; i++) //For loop to draw LIs in unordered list
    {
      var li = document.createElement('li'); //Creates li
      output.appendChild(li); //attaches li to the output list
      li.onclick = function() //provides list items removal function
      {
  
        function remove() {
          delete list[i]; //pulls it out of the array. Delete prefered to Splice so I can maintain original location of other array items.
          console.log(list);
        }
        remove();
        this.parentNode.removeChild(this); //pulls it out of the DOM
      };
  
      li.innerHTML = li.innerHTML + list[i]; //adds the entryBox value to the li
    }
  }
  </code></pre>
  
  <p>I also put the code in a JSFiddle; the JS in the Fiddle didn't work at all, but I don't want to distract this into a JSFiddle lesson. <a href="https://jsfiddle.net/y3sjs7po/" rel="nofollow">https://jsfiddle.net/y3sjs7po/</a></p>