Last active
March 30, 2020 12:22
-
-
Save onedebos/96cf4bdc6035f21af39fbe8d0671a9d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def find_country_by_name(country_to_find) | |
down_country = country_to_find.downcase | |
all_countries.select { |country| country[:name].downcase == down_country } | |
end | |
puts find_country("nigeria") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment