title: How can i delete specific item from LocalStorage
body: <p>There is a lot of value in my local store and I want to delete some of them. When I click on the dynamic card I created, it should be deleted both normally and locally. I can normally delete it but I can not delete it from local.</p>
  
  <p>The local storage event is very confusing and does not have a lot of explanatory resources. at least i could not find it. Thank you for your help already.</p>
  
  <p><a href="https://codepen.io/akagamina/pen/RBgeRR" rel="nofollow noreferrer">This is codepen</a></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>$('#field').keypress(function (e) {
      if (e.keyCode === 13 &amp;&amp; !e.shiftKey) {
          e.preventDefault();
  
          if ($('#field').val() === '') return false;
  
          let comment = {
              card: $('#field').val(),
              id: generateGUID()
          };
          $('#field').val('')
          var store = JSON.parse(localStorage.getItem('todo')) || [];
          store.push(comment);
          localStorage.setItem('todo', JSON.stringify(store));
          $(this).val('');
          displayComment(comment);
      }
  });
  
  function displayComment(comment) {
      var html = $(`&lt;div class="card" data-id="${comment.id}"&gt;&lt;h5&gt;${comment.card}&lt;/h5&gt;&lt;/div&gt;`);
      $('.yorum').append(html);
  
      $('.yorum').find(html).click(function () {
          $(html).remove();
      });
  
  }
  
  
  var store = JSON.parse(localStorage.getItem('todo')) || [];
  store.forEach(displayComment);</code></pre>
  </div>
  </div>
  </p>