WLJS LogoWLJS Notebook

PreDecrement

--x decreases the value of x by 1, returning the new value of x.

Examples

Pre-decrement a variable:

x = 5;
--x
(* 4 *)

The variable is modified in place:

x
(* 4 *)

Please visit the official Wolfram Language Reference for more details.

On this page