/ (Division)

The Division operator is used to divide the left operand by the right operand. The result of the division is then returned as the value. If either of the operands are strings, they are converted to numbers, then evaluated.

syntax:

numberOne / numberTwo

EXAMPLE

var variableOne = 50;

var newValue = 25 / variableOne;

document.write("The result of the division is " + newValue);

This example shows that one variable has been declared, called variableOne. It initially has a value of 100, then is divided by 25 when the division operator is declared within the newValue variable. The result of the newValue variable is then written to the screen utilizing the document.write statement.