Returns the rest of the elements in an array. Pass an index to return the values of the array from that index onward
返回数组中的元素的其余部分。通过索引返回数组中的值,从该指数开始. 别名tail
_.rest([5, 4, 3, 2, 1]); => [4, 3, 2, 1]
源码:
_.rest = _.tail = function(array, index, guard) { return slice.call(array, (index == null) || guard ? 1 : index); };