February 2018
Intermediate to advanced
298 pages
8h 22m
English
You can remove a single item from the localStorage object. For this, you will need to have the key of the key-value pair you want to remove. This could be anything you no longer need.
Accessing it further in your code will result in null, as follows:
localStorage.removeItem('myKey');console.log(localStorage.getItem('myKey')); // null
Read now
Unlock full access