>>>

1 + 2 * 3

7

>>>

1.0E308 * 10

Infinity

Sometimes the numerical representation just isn't enough.

>>>

1E309 * 1E-308 * -1

-Infinity

>>>

Number.MAX_VALUE

1.7976931348623157e+308

The **Number.MAX_VALUE** &
**Number.MIN_VALUE** constants provide access
to the floating-point extremes.

>>>

5 / 3

1.6666666666666667

>>>

5 % 3

2

Integer math is possible by using the **%** (modulo) operator.

>>>

- (1 + 1)

-2

The **+** and **-** operators are also
unary, meaning that they can be applied to a single value.

>>>

Math.round(1.5)

2

A bunch of common mathematical functions are available in the
built-in
Math object.

>>>

isFinite(NaN) || isFinite(Infinity)

false

The global **isFinite**, **isNaN**,
**parseInt** & **parseFloat**
built-in functions are also useful. See the
Mozilla JavaScript Reference for all details.

The console allows you to interact with the course material and examples. Use the following keys:

**<Enter>**— Execute the code**<Shift + Enter>**— Add line break**<Arrow-Up>**— Previous command in history**<Arrow-Down>**— Next command in history

A special logging function is also available:

**print(value)**— Prints a value to the console.**print(value, true)**— Prints a debug version of a value.

+,-,*and/also work as expected. Standard mathematical associativity rules (operator precedence) apply.