As others have explained, this is a bitwise zero shift operator.
For positive values, this has the same effect as the regular >> operator. With negative values, the most significant bit is the โsignโ bit. A normal shift will shift the sign bit to (1 for negative values, 0 for positive). >>> has a different effect, since it always shifts to zero instead of the sign bit:
-2>>1 == -1 -2>>>1 == 2147483647
More information on how negative values โโare presented can be found here .
What all shift operators do is different from a 32-bit integer (at least my Firefox does), so going to 0 means that the value will always fall within the 32-bit range. A bit shift with 0 also ensures that the value is positive:
a = Math.pow(2,32) // overflow in 32-bit integer a>>0 == 0 b = Math.pow(2,32) - 1 // max 32-bit integer: -1 when signed, 4294967295 when unsigned b>>0 == -1 b>>>0 == 4294967295 // equal to Math.pow(2,32)-1
source share