update snippets 32-47

This commit is contained in:
Stefan Feješ
2017-12-25 14:10:38 +01:00
parent 823aa0c305
commit 62618883bf
15 changed files with 65 additions and 20 deletions

View File

@ -7,5 +7,8 @@ Use `Array.map()` and `parseInt()` to transform each value to an integer.
```js
const digitize = n => [...''+n].map(i => parseInt(i));
// digitize(2334) -> [2, 3, 3, 4]
```
```js
differenceWith([1, 1.2, 1.5, 3], [1.9, 3], (a,b) => Math.round(a) == Math.round(b)) -> [1, 1.2]
```