Update zipObject.md
This commit is contained in:
@ -6,6 +6,6 @@ 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])
|
||||
zipObject(['a','b','c'], [1,2]) -> {a: 1, b: 2, c: undefined}
|
||||
*/
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user