update snippets 62-78

This commit is contained in:
Stefan Feješ
2017-12-25 14:23:06 +01:00
parent 700e6edfe7
commit 038df28ca5
16 changed files with 78 additions and 33 deletions

View File

@ -6,5 +6,8 @@ Create a `Set` from `b`, then use `Array.filter()` on `a` to only keep values co
```js
const intersection = (a, b) => { const s = new Set(b); return a.filter(x => s.has(x)); };
// intersection([1,2,3], [4,3,2]) -> [2,3]
```
```js
intersection([1,2,3], [4,3,2]) -> [2,3]
```