title: Make 2 counters with different storage
body: <p>I am going to make more so just need help with how to make them different counters, i tired google and some html documents but didn't find the way to do it.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function clickCounter() {
    if (typeof(Storage) !== "undefined") {
      if (localStorage.clickcount) {
        localStorage.clickcount = Number(localStorage.clickcount) + 1;
      } else {
        localStorage.clickcount = 1;
      }
      document.getElementById("result").innerHTML = "Sälj  " + localStorage.clickcount + "  st.";
    } else {
      document.getElementById("result").innerHTML = "Sorry, your browser does not support web storage...";
    }
  }
  
  function clickCounter(b) {
    if (typeof(Storage) !== "undefined") {
      if (localStorage.clickcountr) {
        localStorage.clickcountr = Number(localStorage.clickcountr) + 1;
      } else {
        localStorage.clickcountr = 2;
      }
      document.getElementById("resultr").innerHTML = "Annu  " + localStorage.clickcountr + "  st.";
    } else {
      document.getElementById("resultr").innerHTML = "Sorry, your browser does not support web storage...";
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;&lt;button onclick="clickCounter()" type="button"&gt;Sälj!&lt;/button&gt;&lt;/p&gt;
  &lt;div id="result"&gt;&lt;/div&gt;
  
  &lt;p&gt;&lt;button onclick="clickCounter(b)" type="button"&gt;Annu!&lt;/button&gt;&lt;/p&gt;
  &lt;div id="resultr"&gt;&lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <ol>
  <li>--Sälj = first counter</li>
  <li>--Annu = second counter</li>
  </ol>