...

/

Variable Scope

Variable Scope

This lesson discusses the scope of variables including the local and global variables.

Introduction #

The scope of a variable refers to the variable’s visibility, i.e., which part of the program can access that variable.

Types of Variables #

There are two types of variables depending on the scope (or visibility):

  • local variables
  • global variables
...