# .reset()

### reset(filter)

| **Parameter** | **Description**                                                                                                                                                                                                                                                         |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| filter        | <p><a href="https://developer.mozilla.org/en-US/docs/Glossary/Callback_function">Callback</a> (optional)</p><p>Function to test each element of the array. Return a value that coerces to <code>true</code> to keep the element, or to <code>false</code> otherwise</p> |

| **Returns**                                                                                                                                                        | **Description**   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------- |
| [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)<[Data](https://simpldb.gitbook.io/docs/types-and-interfaces/data)> | The reset entries |

```javascript
// Note: BankAccounts is a collection created with
// a default value of 0 for a key named "balance"

BankAccounts.get();  // [{ id: 1, balance: 0 }, { id: 2, balance: 850 }] 

BankAccounts.reset(acc => acc.id === 2); // [{ id: 2, balance: 0 }] 

BankAccounts.get();  // [{ id: 1, balance: 0 }, { id: 2, balance: 0 }] 
```
