From 4b697e63512989eeac9a1da0160a9a7fd7f9adcb Mon Sep 17 00:00:00 2001 From: Robert Mennell Date: Wed, 20 Dec 2017 16:18:57 -0800 Subject: [PATCH] Update zipObject.md --- snippets/zipObject.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/snippets/zipObject.md b/snippets/zipObject.md index 3bf6bee60..d1f8b9e32 100644 --- a/snippets/zipObject.md +++ b/snippets/zipObject.md @@ -1,8 +1,8 @@ ### zipObject -Given an Array of valid property identifiers and an Array of values, `zipObject` returns an object associating the properties to the values +Given an array of valid property identifiers and an array of values, `zipObject` returns an object associating the properties to the values -Since an object can have undefined values but not undefined property pointers, the Array of properties is used to decide the structure of the resulting object through a `reduce` +Since an object can have undefined values but not undefined property pointers, the array of properties is used to decide the structure of the resulting object through a `reduce` ```js const zipObject = ( props, values ) => props.reduce( ( obj, prop, index ) => ( obj[prop] = values[index], obj ), {} )