Using Ruby why can't I pass random variable here? I tried different combinations such as removing numbers.
money= rand(100)
def paycheck(money)
"Lets make this amount, #{money} today"
end
puts paycheck("100")
puts paycheck("200")
puts paycheck("500")
You can:
money= rand(100)
puts paycheck(money)
When you define your method paycheck(money)
- it is different variable money
that the one on this line: money = rand(100)