Convert loop to for..of
Replace regular for
loops and anArray.forEach
loops with for...of
loops.

for...of
loops over iterable objects, for example arrays or strings.
It is easier to read than indexed for
loops and can replace them in many cases.
Refactoring Example
Before:
for (let i = 0; i < elements.length; i++) {
const element = elements[i];
console.log(element);
}
After:
for (const element of elements) {
console.log(element);
}