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
propsis longer thanvalues, remaining keys will beundefined. - If the length of
valuesis longer thanprops, remaining values will be ignored.