82
Addition/Plus (+) Operator
The ‘+’ operator is used to append one string to another, or to add two integer values together.
Adding a number to a string will produce a string with the number (as text) appended to the end. Adding
a string to a number results in just the number (unless the string contains a value that can be converted to
a number).
For example:
This expression...
... resolves to this value.
3+4
7
“Hello”+” “+”There”
“Hello There”
“Hello”+3
“Hello3”
3+”Hello”
3
3+”6”
9
Subtraction/Minus (-) Operator
The subtraction operator works with both numerical values and strings values. Use this operator with
strings to remove a sub-string from a source string, or use this operator to subtract two integer values.
For example:
This expression...
... resolves to this value.
6-2
4
“Hello”-”ll”
“Heo”
10-”3”
7
Multiplication/Times (*) Operator
This operator multiplies two numbers, or can be used for creating a string with a repeating value. The
numbers and strings can be either Variables or literals.
For example:
This expression...
... resolves to this value.
4*5
20
“Hello”*3
“HelloHelloHello”
3*”Hello”
0