💠 Variables in Solidity
There are mainly two types of variables available in Solidity.
Local Variables: Variables with values that will persist till the function is completed
State Variables: Variables whose values are kept in a contract storage system permanently
There are mainly two types of variables available in Solidity.
Local Variables: Variables with values that will persist till the function is completed
State Variables: Variables whose values are kept in a contract storage system permanently
🔹 State variable
State variables store the value permanently in the contract storage. Each method should have its own scope, and state variables should be declared outside of any defined functions.
State variables store the value permanently in the contract storage. Each method should have its own scope, and state variables should be declared outside of any defined functions.
🔹 Local Variable
A local variable's context is contained within the function, and it cannot be retrieved from outside of it. These variables are typically used to store temporary values.
A local variable's context is contained within the function, and it cannot be retrieved from outside of it. These variables are typically used to store temporary values.
💠 Operators in Solidity
Operators are important in every programming language because they establish the groundwork for the programming. Similarly, the functionality of Solidity is also incomplete without the use of operators.
Operators are important in every programming language because they establish the groundwork for the programming. Similarly, the functionality of Solidity is also incomplete without the use of operators.
Solidity supports the following types of operators:
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Bitwise Operators
- Assignment operators
- Conditional Operators
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Bitwise Operators
- Assignment operators
- Conditional Operators
However, in this thread, we are going to study only 2 of them but in future threads, I will try to explain all of them :)
Loading suggestions...