Skip to content

Angelo Deleon - JAVASCRIPT-II#391

Open
RaDeleon wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
RaDeleon:master
Open

Angelo Deleon - JAVASCRIPT-II#391
RaDeleon wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
RaDeleon:master

Conversation

@RaDeleon

Copy link
Copy Markdown

@kamry_bowman

@Velsu Velsu left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job on the assignment Angelo. All exercises done properly. You should add some logs to callbacks.js to see if methods are actually working but i tested them and they return proper results.

I also added a comment regading .map() method, because You used it as regular forEach loop which is not necessary.

Overall great job 👍

let allCaps = [];

runners.map((item) => {
allCaps.push(item.first_name.toUpperCase());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use push when using .map(), as it already creates a copy of new array with modified data from the old one, so better aproach would be something like this:

allCaps = runners.map(item => {
  return item.first_name.toUpperCase();
});

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