Advertisement
Guest User

Untitled

a guest
Sep 2nd, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. # #3.times do
  2. # # puts "Hello!"
  3. # #end
  4.  
  5.  
  6. # number = 0
  7. # while (number <= 10) do # while this condition is true, do...
  8. # p "the number is now #{number}" # whatever is in this code block
  9. # number += 1 # short for number = number + 1
  10. # end
  11.  
  12. (0..10).each do |n|
  13. p "the new number is #{n}"
  14. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement