Skip to content

Creating Array Maps In The Lab#25

Open
Shantelgray wants to merge 2 commits into
learn-co-curriculum:masterfrom
Shantelgray:master
Open

Creating Array Maps In The Lab#25
Shantelgray wants to merge 2 commits into
learn-co-curriculum:masterfrom
Shantelgray:master

Conversation

@Shantelgray
Copy link
Copy Markdown

Creating array maps in the lab

Comment thread index.js Outdated
Comment on lines +15 to +21
return tutorials.map(word =>
word.split(' ')
.map(word => word[0].toUpperCase() + word.slice(1)
)
.join(' ')
);
};
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is great! It works! But it's a little messy which can make it harder to understand than needed. You could try using the VS Code extension called "Prettier" which auto-formats your code for you. Either way, make sure you take the time to clean up your syntax before submitting in the future. Thanks!

Suggested change
return tutorials.map(word =>
word.split(' ')
.map(word => word[0].toUpperCase() + word.slice(1)
)
.join(' ')
);
};
return tutorials.map(word =>
word.split(' ')
.map(word => word[0].toUpperCase() + word.slice(1))
.join(' ')
);
};

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