Home

function: tail


tail(array: Array): Array

Gets all but the first element of `array`.

Example(s):

tail([1, 2, 3])
// => [2, 3]

Params:

Name Type Attribute Description
array The array to query.

Returns:

Array

  {
    "comment": "/**\r\n * Gets all but the first element of `array`.\r\n *\r\n * @since 4.0.0\r\n * @category Array\r\n * @param {Array} array The array to query.\r\n * @returns {Array} Returns the slice of `array`.\r\n * @example\r\n *\r\n * tail([1, 2, 3])\r\n * // => [2, 3]\r\n */",
    "meta": {
        "range": [
            248,
            414
        ],
        "filename": "tail.js",
        "lineno": 13,
        "path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
        "code": {
            "id": "astnode100008920",
            "name": "tail",
            "type": "FunctionDeclaration",
            "paramnames": [
                "array"
            ]
        },
        "vars": {
            "length": "tail~length",
            "undefined": null
        }
    },
    "description": "Gets all but the first element of `array`.",
    "since": "4.0.0",
    "tags": [
        {
            "originalTitle": "category",
            "title": "category",
            "text": "Array",
            "value": "Array"
        }
    ],
    "params": [
        {
            "type": {
                "names": [
                    "Array"
                ]
            },
            "description": "The array to query.",
            "name": "array"
        }
    ],
    "returns": [
        {
            "type": {
                "names": [
                    "Array"
                ]
            },
            "description": "Returns the slice of `array`."
        }
    ],
    "examples": [
        "tail([1, 2, 3])\r// => [2, 3]"
    ],
    "name": "tail",
    "longname": "tail",
    "kind": "function",
    "scope": "global",
    "___id": "T000002R000811",
    "___s": true,
    "filepath": "tail.js"
}