Replace _.each and _.forEach with array.forEach

Replace Lodash _.each and _.forEach with array.forEach.

Replace _.each and _.forEach with array.forEach

Why is this refactoring helpful?

You can express many _.each and _.forEach calls with standard JavaScript. This refactoring reduces the dependency on Lodash.

What do I need to consider?

Lodash _.each and _.forEach iterate over array-like collections (i.e., non-arrays with a .length property) as if they are arrays. This can lead to differences between _.forEach and the JavaScript Array.forEach.


Related Code Assists

Learn More

Available In