Skip to content

Tail 函数

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

Code

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