what is the point of return in ruby?
- by Sam
What is the difference between return and just putting a variable such as the following:
return
def write_code(number_of_errors)
if number_of_errors > 1
mood = "WTF"
else
mood = "No Problem"
end
mood
end
no return
def write_code(number_of_errors)
if number_of_errors > 1
mood = "WTF"
else
…