Closed
Description
The documentation for the array-foreach
rule provides an example of how to convert a forEach
call to a for...of
construction. However, that example doesn't show a best practice for accessing the array index, and this is not a problem with an obvious solution. For example, how can we convert the following to a for...of
construction?
elements.forEach((element, index) => {...})
Metadata
Metadata
Assignees
Labels
No labels