Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring linkRequirements() #61

Closed

Conversation

abetomo
Copy link
Contributor

@abetomo abetomo commented Aug 21, 2017

  • Fix indent of code
  • Replace map with forEach
    • Because do not use the return value.

Because do not use the return value.
@dschep
Copy link
Contributor

dschep commented Aug 23, 2017

Thanks for the suggestion @abetomo. Already fixed the indent in #58 and I wasn't sure if there's any reason to use Array.forEach over Array.map so I did some googling. At least one source I can find suggests map is faster:

In reality, you shouldn’t be using .forEach() unless other methods such as .map() can’t do the trick. .map() is actually slightly faster than .forEach().

@dschep dschep closed this Aug 23, 2017
@abetomo
Copy link
Contributor Author

abetomo commented Aug 24, 2017

I see!
Thank you for review.

@abetomo abetomo deleted the refactoring_linkRequirements branch August 24, 2017 00:49
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