This example demonstrates how to use the clear() method to delete all the local storage items for this domain.
Since you might not have any items stored in your local storage, we have added a script that creates some for you.
Click the button to delete the items:
Click the button to display all items: