increment

fun increment(amount: Number)

Increment a counter at the document's key defined by the preceding subscripting. This will only succeed if the value at the subscripting-defined key is a counter.

Parameters

amount

the amount to increment the counter by. This can be a positive or a negative value.

Throws

Thrown if trying to update the document at an invalid key.