How to pass variable into loop?

a = 10
for i in 1:100
  global a
  b = a*2
  a = b*0.1
end
1 Like