title: remove value from localstorage javascript
body: <p>I'm trying to remove item from <strong>localStorage</strong> in javasscript but it doesn't work.</p>
  
  <p>It only works manually for the sequence of the following events</p>
  
  <pre><code>Right click --&gt; Inspect element --&gt; Resources --&gt; localStorage --&gt; Right click --&gt; Delete 
  </code></pre>
  
  <p>I tried: </p>
  
  <pre><code>localStorage.clear(); 
  </code></pre>
  
  <p>and</p>
  
  <pre><code>localStorage.removeItem(key); // the key is the link of the page and 
                                // the value is the selected word in the page 
  </code></pre>
  
  <p>and both didn't work, I can save item using <code>localStorage.setItem(key, vaule)</code> and get items from localStorage using <code>localStorage.getItem(key)</code> but I can't remove them.</p>