🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## forEachRight eachRight + [link](./forEachRight "Link to this entry.") + [source](https://github.com/lodash/lodash/blob/4.5.0正式版/lodash.src.js#L7725 "View in source.") + [npm](https://www.npmjs.com/package/lodash.foreachright "See the npm package.") ``` _.forEachRight(collection, [iteratee=_.identity]) ``` 这个方法类似 `_.forEach`,除了它是从右到左遍历的集合中的元素的。 ### 参数 1. collection (Array|Object) 需要遍历的集合 2. [iteratee=_.identity] (Function) 这个函数会处理每一个元素 ### 返回值 (Array|Object) 返回集合 ### 示例 ``` _.forEachRight([1, 2], function(value) { console.log(value); }); // => 输出 `2` 和 `1` ```