JavaScript tutorial:
/ Operator

 

The (/) operator is use to divide two numbers and return a numeric result.

Syntax

result = number1 / number2

The / operator syntax has these parts:

Part

Description

result

Any numeric variable.

number1

Any numeric expression.

number2

Any numeric 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