There are lines in Underscore
_.clone = function(obj) {
if (!_.isObject(obj)) return obj;
return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
};
And I have no idea why obj.slice() was used here to return a obj(array).
If _.isArray(obj) is true, the return becomes obj.slice().
Question
As far as I know, array.slice without parameters does nothing. I think it should be just obj rather than obj.slice().
Is there any reason obj.slice() was used in this line?