Operators
Comma operator (,)
Evaluates its left operand, discards its result, then evaluates and yields the right operand. Commas separating arguments or declarations are not necessarily comma operators.
Formal Syntax & Structure
javascript syntaxjavascript
left , rightParameters & Attributes
| Name | Type | Description |
|---|---|---|
| left | expression | Left operand. |
| right | expression | Right operand; short-circuiting may skip evaluation where applicable. |
Return Value
operand value
Result of the operation.
Working Example
Example Snippetjavascript
console.log((1, 2, 3));