JavaScript >>> Unsigned right shift Operator
The unsigned right shift operator (>>>) moves the bits of an integer to the right, filling with zeros, so the result is never negative.
Description
The unsigned right shift operator >>> shifts bits right and fills the left with zeros, treating the number as an unsigned 32-bit integer. x >>> 0 converts a number to an unsigned 32-bit integer.
Unlike >>, it always fills with zeros from the left, so the result is never negative and can be as large as 232 - 1. -1 >>> 0 gives 4294967295, the largest 32-bit unsigned value.
It's used in low-level code such as hashing algorithms and binary data parsing, and occasionally to make sure an index is a non-negative 32-bit integer. It's the one shift operator that doesn't work with BigInts, because BigInts have no fixed width.
Properties
- Operator
>>>- Category
- Bitwise
- Precedence
- 10 (1 is lowest, 18 is highest)
- Associativity
- left-to-right
Syntax
x >>> yExample
Browser Support
The following information will show you the current browser support for the >>> operator. Hover over a browser icon to see the version that first introduced support for this operator.
Desktop





Tablets & Mobile





