Operators
Unary minus (-)
Converts the operand to a numeric value and negates it. BigInt is supported; Number may yield signed zero or NaN.
Formal Syntax & Structure
javascript syntaxjavascript
-valueParameters & Attributes
| Name | Type | Description |
|---|---|---|
| value | expression | Operand to convert or invert. |
Return Value
Number or BigInt
Converted result.
Working Example
Example Snippetjavascript
console.log(-"7");