Advertisement
Guest User

Untitled

a guest
Feb 20th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. number = 0
  2. #while#
  3. (0..10).each do |n|# while this condition is true, do...
  4. p "the number is now #{number}" # whatever is in this code block
  5. number += 1 # short for number = number + 1
  6. end # don’t forget your end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement