Implementing setCounter
Learn how to implement the setCounter method.
Having seen how strings are stored in StringStore
, its time for us to store integers with Counter. The thought process for this section can be defined as follows:
- Define the storage hash for our counter
- Implement
StoreCounterValue
, a helper function which acts likeStoreString
in the previous - Implement
setCounter