A scope is a region of the program and broadly speaking there are three places, where variables can be declared:
Inside a function or a block which is called local variables,
In the definition of function parameters which is called formal parameters.
Outside of all functions which is called global variables.
Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!