Guest User

Untitled

a guest
Jul 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. #Swap value between two variables
  2. a, b = 5, 10
  3. a, b = b, a
  4.  
  5. #Output message 3 times
  6. 3.times { puts "Hello" }
  7.  
  8. #Output message if condition is true
  9. str = ''
  10. puts "str is empty" if str.empty?
Add Comment
Please, Sign In to add comment