This is the ThingsDB documentation for version v0, click here for the latest version!

Arithmetic operators

Operator Description
+ Addition operator.
- Subtraction operator.
/ Division operator
* Multiplication operator.
% Modulo operator.

Division uses float division if either the numerator or denominator is of type float.

Arithmetic examples:

[
    5 + 2,
    5 - 2,
    5 / 2.0,
    5 / 2,
    5 * 2,
    5 % 2,
];

Return value in JSON format

[
    7,
    3,
    2.5,
    2,
    10,
    1
]