7: Global Variables
Global variables are variables that are declared outside of any function, class, or contract. They are available to all functions, classes, and contracts within the same scope. Tips: some times you declare Error like global variable.
Global variables are declared with the global keyword followed by the type of the variable and its name.
global keyword
censored in solidity
The value of a global variable is initialized with the constructor, and can be modified by any function, class, or contract within the same scope.
That's it for the lesson 7! In the next lesson, View Keyword
Last updated