Put in order · Blockchain and Web3 course · Module 6: Solidity Basics

State Variables vs Local Variables

Arrange the code correctly to show the difference between a state variable and a local one:

Items to put in order

  • }
  • uint public stateVariable = 10;
  • function example() public {
  • uint localVariable = 20;

You can check the correct answer by solving this task in the CodeWorlds game.