Ruby in 100 Minutes

####string gotcha

Ruby can’t do string + num

Use .to_s to get around it

Or maybe use this:

number = 4
puts "print a number: #{number}"

####Symbols

####Iterating

Use times method to repeat an instruction

5.times do
  ...
end

####Arrays

####Hashes

####Conditionals

method name ending in a ?: return true or false

####chomp

####exponentiation

**

5**2

####random

####block as a parameter

####global variable

Your Comments

comments powered by Disqus