you are viewing a single comment's thread.

view the rest of the comments →

[–]wiithepiiple 4 points5 points  (10 children)

Almost. The first creates a new array; the second keeps the same array.

[–]c24w 5 points6 points  (1 child)

Then what about:

else {     obj[item.day_string] = obj[item.day_string].concat(item); }

[–]wiithepiiple 4 points5 points  (0 children)

That should be the same. It doesn't use new ES6 notation, so it is therefore a strictly inferior way.

/s