Skip to content
On this page

Tail 函数

给定一个数组,返回所有除第一个元素之外的剩余元素。

Code

function tail(array) {
  return array.slice(1);
}