I'm a software developer that has been doing professional web application development with Ruby on Rails. These are my postings of various things that I've figured out and learned that I thought might be helpful.
my_array.inject(0){|sum,item| sum + item}
my_array.map{|item| item*2 }
my_array.find_all{|item| item % 3 == 0 }
my_array.sort
my_array.sort.reverse
Post a Comment
No comments:
Post a Comment