💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## sortedLastIndexOf + [link](./sortedLastIndexOf "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L6563 "View in source.") + [npm](https://www.npmjs.com/package/lodash.sortedlastindexof "See the npm package.") ``` _.sortedLastIndexOf(array, value) ``` 这个方法类似 `_.lastIndexOf`,除了它是执行二进制来检索已经排序的数组的。 ### 参数 1. array (Array) 需要检索的数组 2. value (\*) 要评估位置的值 ### 返回值 (number) 返回匹配值的 index ,否则返回 -1. ### 示例 ``` _.sortedLastIndexOf([1, 1, 2, 2], 2); // => 3 ```