From b3db3768fd08215ea4146822904a6d1af2a737e5 Mon Sep 17 00:00:00 2001 From: Robert Mennell Date: Sun, 30 Jun 2019 09:55:54 -0700 Subject: [PATCH] Clarify that keys are being stringified We may also want to mention the edge case of more complex operations in another PR --- snippets/mapObject.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/mapObject.md b/snippets/mapObject.md index f0270321b..c60dbdbec 100644 --- a/snippets/mapObject.md +++ b/snippets/mapObject.md @@ -1,6 +1,6 @@ ### mapObject -Maps the values of an array to an object using a function, where the key-value pairs consist of the original value as the key and the mapped value. +Maps the values of an array to an object using a function, where the key-value pairs consist of the stringified value as the key and the mapped value. Use an anonymous inner function scope to declare an undefined memory space, using closures to store a return value. Use a new `Array` to store the array with a map of the function over its data set and a comma operator to return a second step, without needing to move from one context to another (due to closures and order of operations).