The scope of a variable refers to those parts of your code in which it has meaning and therefore can be used. For example, a variable declared inside a function can only be used inside that function and is not known elsewhere in your code. Try it out!
In the following code window, we explore what happens if two functions use the same names for their variables. What do you expect will be the values of a and b in each of the functions?
What do you think the below code will print? It is really important and beneficial for your learning to think about this first and to try to run through the code in your head. That’s why there is no Run button!