Last active
August 28, 2019 10:36
-
-
Save nemrosim/854683b339962d54e4b77a81b99893ab to your computer and use it in GitHub Desktop.
[Ruby] basics #basics
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
// vim: syntax=ruby | |
#Array | |
adress = [1,2,3,4,5,6] | |
p adress | |
p adress[0] | |
new_adress = adress.reverse! | |
p new_adress | |
# Printto console | |
print "Hello" | |
puts "Hello world" | |
p "Hello world" | |
# METHOD | |
def say_hello(message) | |
puts message | |
end | |
say_hello("Hello in method") | |
say_hello "Hello in method v2" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment