Multiplication Operator in JavaScript



Multiplication Operator

In JavaScript, arithmetic Multiplication Operator is used to find the product of two numeric values.

Syntax

* symbol is used for arithmetic Multiplication operator.

Arithmetic multiplication operator takes two values/variables as operands and returns their product.

a * b  //variables
6 * 4  //values

More than two values/variables can be multiplied in a single expression by chaining multiplication operator.

a * b * c * d        //variables
6 * 4 * 5 * 10 * 85  //values

Examples

1. Find the multiplication of values in a and b.

var a = 10;
var b = 25;

var product = a * b;
console.log(product);

2. Multiplication of more than two values/variables.

var a = 10;
var b = 25;
var c = 14;

var product = a * b * c;
console.log(product);