I disagree. for loop is very verbose and usually if you care about maintainability you should bow for more readability. Performance is something that comes after the app is running in Production for some time...
You are correct, Array.forEach loop is slow, instead use Array.map which does not mutate your array.
I disagree. for loop is very verbose and usually if you care about maintainability you should bow for more readability. Performance is something that comes after the app is running in Production for some time...
You are correct, Array.forEach loop is slow, instead use Array.map which does not mutate your array.