Minus operation

Learn how to negate a value.

The minus operation negates a numeric value. You can use it in scenarios where you need to change the sign of a number from positive to negative or vice versa.

You can use the minus operator by placing a - sign before a numeric value:

-/*<operand>*/

Here is a practical example:

-42