AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
## sortedLastIndex + [link](./sortedLastIndex "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L6525 "View in source.") + [npm](https://www.npmjs.com/package/lodash.sortedlastindex "See the npm package.") ``` _.sortedLastIndex(array, value) ``` 这个方法类似 `_.sortedIndex`,除了它返回在 value 中尽可能大的 index 位置。 ### 参数 1. array (Array) 需要检索的已排序数组 2. value (\*) 要评估位置的值 ### 返回值 (number) 返回 value 应该在数组中插入的 index。 ### 示例 ``` _.sortedLastIndex([4, 5], 4); // => 1 ```