Skip to content

Instantly share code, notes, and snippets.

@Phoenix23A
Created February 20, 2017 19:02
Show Gist options
  • Save Phoenix23A/18c22e1b4221f21c02613c30f1fe2137 to your computer and use it in GitHub Desktop.
Save Phoenix23A/18c22e1b4221f21c02613c30f1fe2137 to your computer and use it in GitHub Desktop.
number = 0
#while#
(0..10).each do |n|# while this condition is true, do...
p "the number is now #{number}" # whatever is in this code block
number += 1 # short for number = number + 1
end # don’t forget your end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment