I am doing some ruby exercises and it said I need to go back and rewrite the script with += shorthand notations.
This exercise deals primarily with lear
You should look for a good book about Ruby, e.g. http://pragprog.com/book/ruby3/programming-ruby-1-9
The first 150 pages cover most of the basic things about Ruby.
str = "I want to learn Ruby"
i = 0
str.split.each do |word|
i += 1
end
puts "#{i} words in the sentence \"#{str}\""
=> 5 words in the sentence "I want to learn Ruby"