Operators

Addition operator (+)

Try the free JavaScript compiler

The binary plus operator converts operands to primitive values, then performs string concatenation if either primitive is a string; otherwise it performs numeric addition. Mixing BigInt and Number in numeric addition throws TypeError.

Formal Syntax & Structure

javascript syntaxjavascript
left + right

Parameters & Attributes

NameTypeDescription
leftexpressionLeft operand.
rightexpressionRight operand.

Return Value

number | bigint | string

Result depends on operand conversion.

Working Example

Example Snippetjavascript
console.log(4 + 5);console.log('4' + '5');
JavaScript Reference