The workaround that I found is to make a function and to call it in the REPL section of the JUNO/Julia environment, for example:
1:Make your function
function choice() # This little game for example
n=1
r=rand(1:9)
while n != 0
print("Guess an digit from 1 to 9 (0 to exit): ")
n = parse(UInt8, readline())
if n==r
println("*****=======lucky find!=======*****")
println("Play again...")
r=rand(1:9)
elseif n!=0
println("Wrong,keep trying")
end
end
end
2: DO NOT try to evaluate choice()
in the text editor or it will crash JUNO/Julia.
3: find the REPL part of JUNO/Julia and evaluate your function, like this for me: julia> choice()
Please let me know if this get fixed or if you have a better idea for the moment.