Operators
Decrement prefix
Subtracts one from the converted numeric target, writes the result and yields the new value. Works on a writable numeric binding or property.
Formal Syntax & Structure
javascript syntaxjavascript
--targetParameters & Attributes
| Name | Type | Description |
|---|---|---|
| target | assignment target | Writable binding or property. |
Return Value
Number or BigInt
New numeric value for prefix; previous numeric value for postfix.
Working Example
Example Snippetjavascript
let n = 3;console.log(--n, n);