D
danielj
def mtdarry
10.times do |num|
square = num * num
return num, square if num > 5
end
end
num, square = mtdarry
puts num
puts square
I can't figure out why this outputs they way it does? I know it is
simple but I just don't get it.
Secondly, I have just started using the SCiTE editor instead of
metapad and it is great! However, when I try to get a string it won't
let me type into the window that pops up.
Any ideas?
Thanks a lot guys,
danielj
10.times do |num|
square = num * num
return num, square if num > 5
end
end
num, square = mtdarry
puts num
puts square
I can't figure out why this outputs they way it does? I know it is
simple but I just don't get it.
Secondly, I have just started using the SCiTE editor instead of
metapad and it is great! However, when I try to get a string it won't
let me type into the window that pops up.
Any ideas?
Thanks a lot guys,
danielj