I'm trying to use reduce to return an array like so:
var myArray = [1,2,3];
_.reduce(myArray, function (seed, item) { return seed.push(item);}, []);
I expect that it will produce an array just like myArray. Instead for the first item, seed is an array. Then for the second item, seed is a number. That causes an error and the third item is never reached.
Whats happening here?
reducelike this? IF you need to clone an array you'wd better justsliceit.myArray.slice()