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

returns true #116

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

returns true #116

wants to merge 1 commit into from

Conversation

masteramyx
Copy link

No description provided.

@@ -1,26 +1,26 @@

def capitalize_each_string(input)
#implement your solution here
input.map {|x| x.capitalize}
Copy link
Member

Choose a reason for hiding this comment

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

There's a shorthand syntax when we just call one method on the block variable:

input.map(&:capitalize)

This means: call capitalize on each item in the array, without needing to name the element as we iterate through them ("x"). It's more "declarative" and generally preferred.

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