Skip to content

Conversation

@jdufresne
Copy link
Contributor

The code is not mapping the data to a new array. It was being used for
iteration only. Therefore, forEach() is the more appropriate function
which does not build a new Array.

@matthiask
Copy link
Member

I like this. But, the new Chromium-based Edge browser doesn't support array destructuring by default yet (https://caniuse.com/mdn-javascript_operators_destructuring_rest_in_arrays)

The code is not mapping the data to a new array. It was being used for
iteration only. Therefore, forEach() is the more appropriate function
which does not build a new Array.
@jdufresne
Copy link
Contributor Author

Thanks, that makes sense. I've reverted the destructuring in that latest revision, but kept the forEach.

@matthiask matthiask merged commit cdf9754 into django-commons:master Oct 1, 2020
@matthiask
Copy link
Member

Thanks!

@jdufresne jdufresne deleted the foreach branch October 2, 2020 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants