Travis build: 1705

This commit is contained in:
30secondsofcode
2020-01-13 08:19:45 +00:00
parent bd80172f4d
commit 164fad4f5e
19 changed files with 199 additions and 228 deletions

View File

@ -10,13 +10,9 @@ Use `Array.prototype.some()` to check if all distinct values are contained in th
Return `false` if the count of any element is greater in the first array than the second one, `true` otherwise.
```js
const isContainedIn = (a, b) => {
for (const v of new Set(a)) {
if (
!b.some(e => e === v) ||
a.filter(e => e === v).length > b.filter(e => e === v).length
)
if (!b.some(e => e === v) || a.filter(e => e === v).length > b.filter(e => e === v).length)
return false;
}
return true;