Created
May 27, 2015 07:01
-
-
Save iheartkode/376e7635691b91038c00 to your computer and use it in GitHub Desktop.
common loops in ruby
This file contains hidden or 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
names = ["bob", "susan", "steve"] | |
# goes through each name in the array then makes a variable name and puts it to the screen | |
names.each do |name| | |
puts name | |
end | |
output: | |
bob | |
susan | |
steve |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment