Attempting to use a variable that is referenced outside its…
Attempting to use a variable that is referenced outside its lexical environment, which encompasses functions and the variables they use, will result in an error.
Attempting to use a variable that is referenced outside its…