There are two types of variables depending on their scope: global variables and local variables.

  • (1). Global variables can be used inside functions
  • (2). Local variables can not be used outside the function
  • (3). Local variables in this scope are destroyed when the function completes execution