zipObject
Associates properties to values, given array of valid property identifiers and an array of values.
- Use
Array.prototype.reduce()
to build an object from the two arrays. - If the length of
props
is longer thanvalues
, remaining keys will beundefined
. - If the length of
values
is longer thanprops
, remaining values will be ignored.