Earn While Learning Web3 Programming>> Start Here FREE!!!
What Is Array In Solidity?
Arrays are used to put together multiple data types in a single variable in solidity. Similar to creating a list.
//no array
uint number1 = 1;
uint number2 = 2;
uint number3 = 3;
uint number4 = 4;
uint number4 = 5;
can now be compressed into one array variable instead of five (5) variable declarations above.
//Array or list
uint[] numbers = [1, 2, 3, 4, 5]; //dynamic array with 4 indexes
Want to learn more? see below:
NOTE:
This Is An Extract From Our FREE Smart Contract Development With Solidity For Beginners Course (If you have not enrolled yet, you can join the course totally for FREE).