Variables In 'Solidity'(Learn 'Solidity' - Part 6)
Solidity is a statically typed language, i.e., the type of variable needs to be declared before the compile time, that's why it is important to define the type of variable.
String
This is how we declare 'string' variables in Solidity.
Other Types Of Variables In Solidity
BOOL - Boolean variable
INT/UINT - Integers
ADDRESS - It represents a 20-byte value which is stored in an Ethereum Address.
BYTES 1 THROUGH 32 - For Fixed-Sized Byte Arrays
BYTES - For Dynamic-Sized Byte Arrays
MAPPING - Hash tables with Key types and Value types
STRUCT - Allows you to find new types
We are going to cover all these in great detail throughout our series.
We have created a new variable 'age' and you will be able to see a new contract at the right-hand side of the window after you hit 'Deploy'.
Previous Posts
Introduction To 'Solidity'(Learn 'Solidity' - Part 1)
Ethereum & Smart Contracts(Learn 'Solidity' - Part 2)
Tips To Learn 'Solidity' On Your Own(Learn 'Solidity - Part 3)
Basic Smart Contract(Learn 'Solidity' - Part 4)
Smart Contract VsnDApp(Learn 'Solidity' - Part 5)
Upcoming Posts
Visibility & Structs In Solidity(Learn 'Solidity - Part 7)