Monday, April 13, 2015

Learning Ruby part I

I have been given a task which requires I learn Ruby. I will try.

I've installed Ruby on my laptop (from links at ruby-lang.org). I found a tutorial on code academy. So I'll see where this leads.

notes:
data types: number, boolean, and string
assignment operator: equal sign
exponentiation: **
modulo: %
print: sends to screen
puts: adds blank line after screen output. hmmm?
I see. print leaves the next output right there, puts goes to the beginning of the next line.

strings have .length
and .reverse
and .upcase and .downcase

hashmark for single line comments
=begin to =end for multi-line comments

No comments:

Post a Comment