operator + method

num operator +(
  1. num other
)

Addition operator.

Adds other to the current value, updates the value, and returns the new value.

Implementation

num operator +(num other) {
  value += other;
  return value;
}