Created
June 25, 2014 17:06
-
-
Save damianesteban/f596375cb80bc11fa552 to your computer and use it in GitHub Desktop.
Arrays and Strings
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
array = ["Ruby", "Pascal", "Smalltalk", "io"] | |
# And then we want to return the value at Index 1: | |
array[1] | |
# vs. | |
puts array[1] | |
# Strictly speaking. is the puts method returning the value | |
# at Index 1, or is it returning the string representation | |
# of the value at Index 1? On top of that, the value at | |
# Index 1 is a string already, so does it really matter? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
puts
always returns nil. Or at leastKernel#puts
always returns nil.