-
-
Save anonymous/9b24217737e8246828e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def increment(x) | |
puts "inside increment function, incrementing #{x}" | |
x+1 | |
end | |
a = increment(1) | |
b = increment(2) | |
puts "This is 1+1: #{a}" | |
puts "This is 2+1: #{b}" | |
puts "This is 4+1: #{(b+2) }" | |
puts "This is #{(b*2)}" | |
increment(11) | |
increment(12) | |
puts "#{a}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment