> For the complete documentation index, see [llms.txt](https://lodash.shujuwajue.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lodash.shujuwajue.com/array.md).

# Array（数组操作）

* [\_.chunk（分块）](/array/chunk.md)
* [\_.compact（过滤假值）](/array/compact.md)
* [\_.concat（连接）](/array/concat.md)
* [\_.difference（过滤值）](/array/difference.md)
* [\_.differenceBy（过滤值）](/array/differenceby.md)
* [\_.differenceWith（过滤值）](/array/differencewith.md)
* [\_.drop（开头丢掉n个元素）](/array/drop.md)
* [\_.dropRight(结尾丢掉n个元素)](/array/dropright.md)
* [\_.dropRightWhile（结尾丢失元素）](/array/droprightwhile.md)
* [\_.dropWhile（开头丢掉元素）](/array/dropwhile.md)
* [\_.fill（填充数组值）](/array/fill.md)
* [\_.findIndex（查找元素索引值）](/array/findindex.md)
* [\_.findLastIndex（查找元素的索引值）](/array/findlastindex.md)
* [\_.first -> head（取数组第一个元素）](/array/first-head.md)
* [\_.flatten（减少一层嵌套）](/array/flatten.md)
* [\_.flattenDeep（递归为一维数组）](/array/flattendeep.md)
* [\_.flattenDepth(减少depth层嵌套)](/array/flattendepth.md)
* [\_.fromPairs(返回键值对对象)](/array/frompairs.md)
* [\_.indexOf（获取元素的索引值）](/array/indexof.md)
* [\_.initial（去除最后一个元素）](/array/initial.md)
* [\_.intersection（数组交集）](/array/intersection.md)
* [\_.intersectionBy（数组交集）](/array/intersectionby.md)
* [\_.intersectionWith（数组交集）](/array/intersectionwith.md)
* [\_.join（转字符串，类php-implode）](/array/join.md)
* [\_.last（获取最后一个元素）](/array/last.md)
* [\_.lastIndexOf（获取元素的索引值）](/array/lastindexof.md)
* [\_.nth（获取元素的值）](/array/nth.md)
* [\_.pull（删除数组中元素）](/array/pull.md)
* [\_.pullAll（删除数组中元素）](/array/pullall.md)
* [\_.pullAllBy（删除数组中的元素）](/array/pullallby.md)
* [\_.pullAllWith（删除数组中的元素）](/array/pullallwith.md)
* [\_.pullAt（删除数组中的元素）](/array/pullat.md)
* [\_.remove（删除数组中的元素）](/array/remove.md)
* [\_.reverse（元素位置反转）](/array/reverse.md)
* [\_.slice（数组截取）](/array/slice.md)
* [\_.sortedIndex（获取索引值）](/array/sortedindex.md)
* [\_.sortedIndexBy（获取索引值）](/array/sortedindexby.md)
* [\_.sortedIndexOf（获取索引值）](/array/sortedindexof.md)
* [\_.sortedLastIndex（获取索引值）](/array/sortedlastindex.md)
* [\_.sortedLastIndexBy（获取索引值）](/array/sortedlastindexby.md)
* [\_.sortedLastIndexOf（获取索引值）](/array/sortedlastindexof.md)
* [\_.sortedUniq（数组去重）](/array/sorteduniqarray.md)
* [\_.sortedUniqBy（数组去重）](/array/sorteduniqby.md)
* [\_.tail（除最后元素的数组）](/array/tailarray.md)
* [\_.take（数组截取）](/array/take.md)
* [\_.takeRight（数组截取）](/array/takeright.md)
* [\_.takeRightWhile（数组截取）](/array/takerightwhile.md)
* [\_.takeWhile（数组截取）](/array/takewhile.md)
* [\_.union（数组合并）](/array/union.md)
* [\_.unionBy（数组合并）](/array/unionby.md)
* [\_.unionWith（数组合并）](/array/unionwith.md)
* [\_.uniq（数组去重）](/array/uniq.md)
* [\_.uniqBy（数组去重）](/array/uniqby.md)
* [\_.uniqWith（数组去重）](/array/uniqwithff08-shu-zu-qu-zhong-ff09.md)
* [\_.unzip（数组重组）](/array/unzip.md)
* [\_.unzipWith（数组重组）](/array/unzipwith.md)
* [\_.without（过滤元素值）](/array/without.md)
* [\_.xor（数组取差集）](/array/xor.md)
* [\_.xorBy（数组取差集）](/array/xorby.md)
* [\_.xorWith（数组取差集）](/array/xorwith.md)
* [\_.zip（数组重组）](/array/zip.md)
* [\_.zipObject（返回键值对新数组）](/array/zipobject.md)
* [\_.zipObjectDeep（返回键值对新数组）](/array/zipobjectdeep.md)
* [\_.zipWith（数组重组）](/array/zipwith.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://lodash.shujuwajue.com/array.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
