title: Set items in localStorage on second web session/after refreshing
body: <p>I am setting array elements into my localStorage.</p>
  <p>I click the function appendTasks here once and items are being stored correctly on localStorage for the first web session:</p>
  <pre><code>function appendTasks() {
    tasks.push(input.value);
    tasks.join(&quot; &quot;);
    for (let i = 0; i &lt; tasks.length; i++) {
       //Add to Local Storage
      localStorage.setItem(i, tasks[i]) 
    }
  </code></pre>
  <p>This is how my localStorage looks like:</p>
  <p><a href="https://i.stack.imgur.com/6c1wr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6c1wr.png" alt="enter image description here" /></a></p>
  <p>Once I refresh the page after adding these elements and try to add more it simply doesn't. It goes as far as adding elements on the first web session.</p>
  <p>Anyone knows why am I seeing this behavior?</p>
  <p>Thanks</p>