Hi,
As always, I'm asking simple questions sorry.
Please help me to understand the "return" method because I dont see
where or how to use it.
Here I'm using the return method but the thing is that if remove it, it
also works, so I was wondering why would you use it if by defaul all
methods return a value?
def multiply(val1, val2 )
result = val1 * val2
return result
end
value = multiply( 10, 20 )
puts value
Can some one show me the main purpose of using the return method?
Again I'm currently trying to understand the basics, so please be
patient : )
Thanks
--
Posted via http://www.ruby-forum.com/.