Update snippet descriptions
This commit is contained in:
@ -5,7 +5,8 @@ tags: array,math,intermediate
|
||||
|
||||
Returns the symmetric difference between two arrays, without filtering out duplicate values.
|
||||
|
||||
- Create a `Set` from each array, then use `Array.prototype.filter()` on each of them to only keep values not contained in the other.
|
||||
- Create a `new Set()` from each array to get the unique values of each one.
|
||||
- Use `Array.prototype.filter()` on each of them to only keep values not contained in the other.
|
||||
|
||||
```js
|
||||
const symmetricDifference = (a, b) => {
|
||||
|
||||
Reference in New Issue
Block a user