Lesson 5
Writing Reusable and Self-explanatory Programs
Chapter 6: Function scope
Local scope across functions
This local scope also applies from inside a function.
Try running the code below.
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Again, you should get a similar error. x
can only be accessed in Lines 1 and 2.