Hi,

I need some help please, I have an error that i don’t understand how to fix it. Something that i can’t see.

julia> a=0

0

julia> (a+=1 for i in 1:3)

Base.Generator{UnitRange{Int64},getfield(Main, Symbol("##3#4"))}(getfield(Main, Symbol("##3#4"))(), 1:3)

julia> a

0

julia> for i=1:3

a = a+1

end

ERROR: UndefVarError: a not defined

Stacktrace:

[1] top-level scope at .\REPL[4]:2 [inlined]

[2] top-level scope at .\none:0

Can someone help me to understand what is wrong?