Exercise: Writing Functions
Practice writing functions in Solidity.
We'll cover the following...
Now, it's time to practice our newly-acquired skills and try to write a few functions ourselves.
In all exercises, a starter code will include several TODO
comments, which we'll need to replace with a correct implementation.
Increment function
For the first exercise, we need to define a function that increments the state variable in our smart contract. To implement it, find the following TODO
statement and replace it with the function implementation:
Access this course and 1400+ top-rated courses and projects.