July 2020
Beginner
301 pages
3h 36m
English
When we declare a variable, its name is valid only inside some sections of the source code. And that section (part, portion, region) of the source code is called scope. It is the region of code in which the name can be accessed. There are different scopes:
When we declare a name inside a function, that name has a local scope. Its scope starts from the point of declaration till the end of the function block marked with }.
Our variable x is declared inside a myfunction() ...