Skip to main content
Version: Next

Numeric expressions

Literal

Creates a new numeric value. Leading zeros are valid.

1

0.5
.5

-2

01

-0002

Addition

Adds a value to another value.

2 + 3
// 5

Subtraction

Subtracts a value from another value.

5 - 3
// 2

Multiplication

Multiplies a value by another value.

5 * 3
// 15

Division

Divides a value by another value.

6 / 2
// 3

Exponentiation

Raises a value to the power of another value.

2 ** 3
// 8