Storage API

storage.remove()

Removes the properties and their associated values for the passed keys in the storage.

  • Accepts arguments as strings and arrays of strings.
    You can pass storage keys as individual arguments, as an array, or as a string separated by commas or spaces.
    Each value is seen as a new argument.
  • If no arguments are passed, it removes all properties and their associated values from the storage.
Example:
storage.remove();
// Removes all data from the storage.

storage.remove('key1');
// Removes the data for the key 'key1'.

storage.remove('key1', 'key2');
storage.remove(['key1', 'key2']);
storage.remove('key1, key2');
storage.remove('key1 key2');
// Removes the data for the keys 'key1' and 'key2'.