Skip to content

Instantly share code, notes, and snippets.

@alexgriff
Created August 28, 2017 17:53
Show Gist options
  • Save alexgriff/240064c2f6d7cd99d2391d8b53d42efa to your computer and use it in GitHub Desktop.
Save alexgriff/240064c2f6d7cd99d2391d8b53d42efa to your computer and use it in GitHub Desktop.
# write a method 'get_names' that receives an array of instructors:
instructors = [{name: 'terrance', hometown: 'nj', mood: 'excited'}, {name: 'daniel', hometown: 'philadelphia', mood: 'refreshed'}, {name: 'alex', hometown: 'upstate ny', mood: 'good' }]
def get_names(instructors)
end
# the method should return an array of just the instructors names
# => ['terrance', 'daniel', 'alex']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment