JavaScript tutorial:
* operator

 

The (*) operator is use to multiply two numbers.

Syntax

result = number1*number2

The * operator syntax has these parts:

Part

Description

result

Any variable.

number1

Any expression.

number2

Any expression.

Example

For information on when a run-time error is generated by the * operator, see the Operator Behavior table.

See also: *= Operator, Operator Behavior, Operator Precedence, Operator Summary