update snippets 0-All

This commit is contained in:
Stefan Feješ
2017-12-25 14:49:52 +01:00
parent 7e52dd6d43
commit 0be78ba089
33 changed files with 155 additions and 63 deletions

View File

@ -6,6 +6,9 @@ Since an object can have undefined values but not undefined property pointers, t
```js
const zipObject = ( props, values ) => props.reduce( ( obj, prop, index ) => ( obj[prop] = values[index], obj ), {} )
// zipObject(['a','b','c'], [1,2]) -> {a: 1, b: 2, c: undefined}
// zipObject(['a','b'], [1,2,3]) -> {a: 1, b: 2}
```
```js
zipObject(['a','b','c'], [1,2]) -> {a: 1, b: 2, c: undefined}
zipObject(['a','b'], [1,2,3]) -> {a: 1, b: 2}
```