Arithmetic ( + - * / % ** )
Four operations, remainder (%), and exponentiation (**).
Syntax
$a + $b, $a % $b, $a ** $b
Description
Standard mathematical operators. % gives the remainder, ** gives the exponent.
Example
Loading editor…
Expected output
10 1 1024
When to use?
Calculations, even/odd check (% 2).