Skip to content

Conversation

@mshecket
Copy link

I tried to include good comments.

# that have either "c" or "d" as
# their first character
input.select { |item|
item[0,1] == "c" or item[0,1] == "d" }
Copy link
Member

Choose a reason for hiding this comment

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

Check out String#start_with? for a way to simplify this a bit.

Copy link
Author

Choose a reason for hiding this comment

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

Will do, thanks!

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