Search.../

removeItem( )

Removes an item from local, session, or memory storage.

Syntax

function removeItem(key: string): void

removeItem Parameters

NAME
TYPE
DESCRIPTION
key

string

The key of the item to remove.

Returns

This function does not return anything.

Return Type:

void

Related Content:

Was this helpful?

Remove an item from local storage

Code Example

Copy Code
1import {local} from 'wix-storage';
2
3// ...
4
5local.removeItem("key");
Remove an item from session storage

Code Example

Copy Code
1import {session} from 'wix-storage';
2
3// ...
4
5session.removeItem("key");
Remove an item from memory storage

Code Example

Copy Code
1import {memory} from 'wix-storage';
2
3// ...
4
5memory.removeItem("key");