Skip to content

tail

js
_.tail(array)

获取 array 中除第一个元素之外的所有元素。

¥Gets all but the first element of array.

新增于

¥Since

4.0.0

参数

¥Arguments

  1. array (数组):要查询的数组。

    ¥array (Array): The array to query.

返回

¥Returns

(数组):返回 array 的切片。

¥(Array): Returns the slice of array.

示例

¥Example

js
_.tail([1, 2, 3]);
// => [2, 3]

Lodash v4.17 中文网 - 粤ICP备13048890号