## MemoryStorage.setItem() method [​](/content/docs/sdk/core.memorystorage.setitem#memorystoragesetitem-method "Direct link to MemoryStorage.setItem(/index.html) method")

Sets the value of the pair identified by key to value, creating a new key/value pair if none existed for key previously.

**Signature:**

```typescript
setItem(key: string, value: string | null): void;
```

## Parameters [​](/content/docs/sdk/core.memorystorage.setitem#parameters "Direct link to Parameters"/index.html)

| Parameter | Type | Description |
| --- | --- | --- |
| key | string | The storage key. |
| value | string \| null | The new value. |

**Returns:**

void

- [MemoryStorage.setItem() method](/content/docs/sdk/core.memorystorage.setitem#memorystoragesetitem-method/index.html)
- [Parameters](/content/docs/sdk/core.memorystorage.setitem#parameters/index.html)
