I have a very simple Julia code:
x=0
for n in 1:10
x = x + n
end
println(x)
And it gives me an error:
ERROR: LoadError: UndefVarError: x not defined
Stacktrace:
[1] top-level scope at /home/piotr/julia_codes/t4.jl:3
[2] include(::Module, ::String) at ./Base.jl:377
[3] exec_options(::Base.JLOptions) at ./client.jl:288
[4] _start() at ./client.jl:484
in expression starting at /home/piotr/julia_codes/t4.jl:2
What should I check?