Multiplication operation
Learn how to multiply two numeric values.
The multiplication operation multiplies two numeric values and returns the product.
To use the multiplication operator, place a * sign between two numeric values:
/*<operand>*/ * /*<operand>*/
For a more natural reading, you can alternatively write:
/*<operand>*/ times /*<operand>*/
Here is a practical example:
2 * 3 // 6
Because the multiplication operation is commutative, the order of the operands does not matter. This is confirmed by the expression below:
2 * 3 is equal to 3 * 2
Note that multiplication has higher precedence than addition and subtraction. This means that multiplication is performed before those operations, as shown below:
2 + 3 * 4 // 14, not 20