logoAcademy

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 like StoreString in the previous
  • Implement setCounter

Updated:

On this page

No Headings
Edit on Github