Jey Balachandran Jey Balachandran - 1 year ago 98
Javascript Question

JavaScript triple greater than

I saw this syntax on another StackOverflow post and was curious as to what it does:

var len = this.length >>> 0;


What does
>>>
imply?

Joe Joe
Answer Source

That's an unsigned right shift operator. Interestingly, it is the only bitwise operator that is unsigned in JavaScript.

The >>> operator shifts the bits of expression1 right by the number of bits specified in expression2. Zeroes are filled in from the left. Digits shifted off the right are discarded.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download