Does scoping in julia 1.0.0 with for-loops make sense to beginners? [closed]
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed last year . In julia 1.0.0, I get the following for-loop scoping behavior: julia> counts = 0 0 julia> for i in 1:10 counts += 1 end ERROR: UndefVarError: counts not defined I found the solution was to make the counts variable global inside the for loop. julia> for i in 1:10 global counts +