Skip to content

Instantly share code, notes, and snippets.

@jomontanari
Created October 28, 2011 12:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jomontanari/1322198 to your computer and use it in GitHub Desktop.
Save jomontanari/1322198 to your computer and use it in GitHub Desktop.
Ruby - Day 1 (7l7w)
#Print the string Hello World
puts "Hello, World"
#Find the index of Ruby in "Hello, Ruby"
"Hello, Ruby".index("Ruby")
#Print your name 10 times
(1..10).each do
puts "Jo Cranford"
end
#Print "this is sentence number 1" where the number 1 changes from 1 to 10
(1..10).each do |num|
puts "this is sentence number #{num}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment