File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ if (true) {
57
57
var foo = 123 ;
58
58
}
59
59
```
60
- However if the variable name is already taken by the surrounding scope then a new variable name is generated as shown (notice ` _foo ` ):
60
+ However if the variable name is already taken by the surrounding scope then a new variable name is generated as shown (notice ` foo_1 ` ):
61
61
62
62
``` ts
63
63
var foo = ' 123' ;
@@ -69,12 +69,12 @@ if (true) {
69
69
70
70
var foo = ' 123' ;
71
71
if (true ) {
72
- var _foo = 123 ; // Renamed
72
+ var foo_1 = 123 ; // Renamed
73
73
}
74
74
```
75
75
76
76
#### Switch
77
- You can wrap your ` case ` bodies in ` {} ` to reuse variable names reliably in different ` case ` statement as shown below:
77
+ You can wrap your ` case ` bodies in ` {} ` to reuse variable names reliably in different ` case ` statement as shown below:
78
78
79
79
``` ts
80
80
switch (name ) {
You can’t perform that action at this time.
0 commit comments