In "_reduce" function i made, spliced array is allocated to original array, but is not changed, why?
Advertisements function _each(list, iter){ for(var i=0; i<list.length; i++){ iter(list[i]); } } this is code for list circuit var slice = Array.prototype.slice; function _rest(list, num){ return slice.call(list, num || 1); } I want to apply this to not only array but array-like object. So I use slice.call function _reduce(list, iter, memo){ if(arguments.length == 2){ memo =… Read More In "_reduce" function i made, spliced array is allocated to original array, but is not changed, why?