💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、豆包、星火、月之暗面及文生图、文生视频 广告
## initial + [link](./initial "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L6072 "View in source.") + [npm](https://www.npmjs.com/package/lodash.initial "See the npm package.") ``` _.initial(需要检索的数组) ``` 获取数组中除了最后一个元素之外的所有元素 ### 参数 1. 需要检索的数组 (Array) ### 返回值 (Array) 返回没有最后一个元素的数组 ### 示例 ``` _.initial([1, 2, 3]); // => [1, 2] ```