Travis build: 1682
This commit is contained in:
@ -12,10 +12,9 @@ Return `false` if the counts do not match for any element, `true` otherwise.
|
||||
```js
|
||||
const haveSameContents = (a, b) => {
|
||||
for (const v of new Set([...a, ...b]))
|
||||
if (a.filter(e => e === v).length !== b.filter(e => e === v).length)
|
||||
return false;
|
||||
if (a.filter(e => e === v).length !== b.filter(e => e === v).length) return false;
|
||||
return true;
|
||||
}
|
||||
};
|
||||
```
|
||||
|
||||
```js
|
||||
|
||||
Reference in New Issue
Block a user