Last active
August 29, 2015 14:03
-
-
Save Will-Sommers/f40f9b505af70e41bf7d to your computer and use it in GitHub Desktop.
returning nil
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
# setup 2 functions | |
def a | |
puts "hi vidal" | |
end | |
def b | |
return "hi vidal" | |
end | |
# assign the results each function to a variable | |
test_1 = a | |
test_2 = b | |
# checking what the variables point to | |
puts test_1 | |
puts test_2 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment