0
why there is an error
i = 5 def hello() print i end hello() #why this doesn't work? is "i" not a global variable?
1 ответ
+ 2
Use parameters and arguments
i = 5
def hello(i)
puts i
end
hello(i)
i = 5 def hello() print i end hello() #why this doesn't work? is "i" not a global variable?