increment method

void increment([
  1. num by = 1
])

Increments the numeric value by by (default: 1).

Example:

counter.increment(); // +1
counter.increment(5); // +5

Implementation

void increment([num by = 1]) => value += by;