Created
March 12, 2016 20:49
-
-
Save RMcNeely/efed558737e210daa5b5 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_the_cheese(array) | |
cheese_types = ["cheddar", "gouda", "camembert"] | |
new_array = [] | |
if array.include?(cheese_types) | |
return new_array << array | |
else return nil | |
end | |
new_array | |
end | |
cheese_types = ["cheddar", "gouda", "camembert"] | |
check_cheese.map! {|check| cheese_types.include?(check)} | |
check_cheese.detect do |boolean| | |
if boolean == true | |
"#{boolean}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment