$inc operator accepts positive and negative values.
If the field does not exist,
$inc creates the field and sets the field to the specified value.
Use of the
$inc operator on a field with a null value will generate an error.
$inc is an atomic operation within a single document.
Consider a collection
products with the following document:
The updated document would resemble: