title: Simple ToDo-List doesn't work
body: <p>My ToDo List dont wanna work the way i want. I've just been working with JavaScript for 2 weeks sthis is very new to me, therefor the code maybe doesnt look that nice. </p>
  
  <p>The result comes out wrong. If I type in "buy food" the first line gonna show just that, but the next time I wanna add "walk the dog", then it displays </p>
  
  <ul>
  <li>buy food</li>
  <li>buy food</li>
  <li>walk the dog</li>
  </ul>
  
  <p>I hope you understand my problem. It also ends the unordered list tag after the first click and adds the rest of the things in another. </p>
  
  <p>Here's the JavaScript: </p>
  
  <pre><code>var taskList = [];
  
  var text = "&lt;ul&gt;"
  
  function addToList() {
      var task = document.getElementById("toDoTask").value;
      taskList.push(task);
  
      for(i = 0; i &lt; taskList.length; i++){
          text += "&lt;li&gt;" + taskList[i] + "&lt;/li&gt;" ;
      }
  
      text += "&lt;/ul&gt;";
  
      document.getElementById("todoList").innerHTML = text;
  }
  </code></pre>