Operators
Subtraction operator (-)
Subtraction converts operands to numeric values and computes the left value minus the right. BigInt operands must both be BigInt; Number arithmetic follows floating-point rules.
Formal Syntax & Structure
javascript syntaxjavascript
left - rightParameters & Attributes
| Name | Type | Description |
|---|---|---|
| left | expression | Value to subtract from. |
| right | expression | Value to subtract. |
Return Value
number | bigint
Numeric difference.
Working Example
Example Snippetjavascript
console.log(9 - 4);