-
-
Save gabrie30/35b75c9a19f4bc889c81 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
# I interpret animal[0] to be the entire word "snake" | |
# Why does this return anything, since s!= sname? | |
array = ["snake", "rat", "cat", "dog","salamandor"] | |
array.each do |animal| | |
puts animal if animal[0] == "s" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment