While loop, variable not defined

Solved with:

i = 0

while i < 10
  global i += 1
  println(i)
end
2 Likes