Operators
Left shift (<<)
Moves bits left. Number operands use signed 32-bit values and the low five bits of the shift count. BigInt shift semantics do not impose that 32-bit limit.
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
Number or BigInt
Result of the operation.
Working Example
Example Snippetjavascript
console.log(1 << 32);