Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, November 21, 2012

Codecademy "Let's Learn Return"


# sample solution


def add(*nums)
  sum = 0
  nums.each {|num| sum+=num}
  return sum
end

puts add(1,2)
puts add(1,2,3,4,5,6,7,8,9,10)

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts