Skip to content

Instantly share code, notes, and snippets.

@krokrob
Created July 11, 2019 08:37
Show Gist options
  • Save krokrob/ac0432e22180041eebfdf7b316c6f35b to your computer and use it in GitHub Desktop.
Save krokrob/ac0432e22180041eebfdf7b316c6f35b to your computer and use it in GitHub Desktop.
musicians = ['David Gilmour', 'Roger Waters', 'Richard Wright', 'Nick Mason']
upcased_first_names = musicians.map do |musician|
first_name = musician.split.first
upcased_first_name = first_name.upcase
puts "[DEBUG] #{musician}'s first name is #{upcased_first_name}"
upcased_first_name
end
p upcased_first_names
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment