Clearing localStorage in javascript?

Is there any way to reset/clear browser’s localStorage in javascript?

Answer

Use this to clear localStorage:

localStorage.clear();

Leave a Reply

Your email address will not be published. Required fields are marked *