A
Abder-Rahman Ali
I have written this a script like this:
values = [10, 20, 30].each {|value| value + (value * 10)}
puts value
In this case, I get:
undefined local variable or method `value' for main:Object (NameError)
I'm trying to see the result of the equation value + (value * 10)
What should I do?
Thanks.
values = [10, 20, 30].each {|value| value + (value * 10)}
puts value
In this case, I get:
undefined local variable or method `value' for main:Object (NameError)
I'm trying to see the result of the equation value + (value * 10)
What should I do?
Thanks.