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

Is this guide helpful?

On this page

No Headings

Privacy Policy

We respect your privacy and are committed to protecting your personal data. This privacy policy will inform you about how we look after your personal data and tell you about your privacy rights.

Read full policy