Previous Topic: Arithmetic Addition Operator

Next Topic: Arithmetic Multiplication Operator

Arithmetic Subtraction Operator

The arithmetic subtraction (-) operator returns the difference between two numeric operands.

If the first operand is a number, but the second is a string or a Boolean, the second operand is converted to a number.

Examples:

1 - 2
Result = -1

1 - "JUAN"
Result = 1

100 - "32JUAN"
Result = 68

More information:

Arithmetic Addition Operator

Arithmetic Multiplication Operator

Arithmetic Division Operator


Copyright © 2010 CA. All rights reserved. Email CA about this topic