We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3054c00 commit 222231fCopy full SHA for 222231f
doc/src/manual/variables-and-scoping.md
@@ -31,8 +31,8 @@ a global variable by the same name is allowed or not.
31
```julia
32
# Print the numbers 1 through 5
33
i = 0
34
- while i < 5 # ERROR: UndefVarError: `i` not defined
35
- i += 1
+ while i < 5
+ i += 1 # ERROR: UndefVarError: `i` not defined
36
println(i)
37
end
38
```
@@ -43,8 +43,8 @@ a global variable by the same name is allowed or not.
43
44
45
let i = 0
46
- while i < 5 # Now `i` is defined in the inner scope of the while loop
47
+ i += 1 # Now outer `i` is defined in the inner scope of the while loop
48
49
50
0 commit comments