Scope
Where in a program a variable can be seen and used.
๐ In simple words
Where in a program a variable can be seen and used.
๐ Technical definition
The region of a program in which a name is visible; variables created inside a function are local to it.
Pseudocode example
1FUNCTION F()2 SET LOCAL_X = 1 // only exists inside F3END FUNCTION
๐ Real-world analogy
What happens in your bedroom stays in your bedroom.