title: How to stop overwriting data in localStorage
body: <p>I'm trying to save some data in localStorage. but every time I refresh the page new data overwrite on older data and I lost my old data. </p>
  
  <pre><code>function testshod() {
      localStorage.setItem("hash", JSON.stringify(testblockchain));
      document.getElementById("result").innerHTML = 
      localStorage.getItem("hash");
      }
  </code></pre>
  
  <p>in store my data like this code. it works correctly but when I refresh the page data are gone.<br/>
  p.s. testblockchain is a class. </p>