Here is the description from the docs of the _.object function.
Converts arrays into objects. Pass either a single list of [key, value] pairs, or a list of keys, and a list of values. If duplicate keys exist, the last value wins.
With this example, it works as expected. The key of "1" is assigned the value of "TEST1".
_.object(["1", "1"], ["TEST", "TEST1"])
>> Object {1: "TEST1"}
_.object(["1", "1"], ["TEST"])
>> Object {1: undefined}
On this last example, I'd expect the value to be "TEST", but it is undefined.
Is there a specific reason for this behavior?
Thanks.
undefined. Makes sense to me.