Jey Balachandran Jey Balachandran - 1 year ago 87
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

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.