Javascript Reference
Categories: Operators

javascript Operators >>

@March 15, 2008, 1:22 a.m.
>> Firefox/Netscape/NN 2 IE 3 ECMA 1  

  

The bitwise right-shift operator shifts the bits of the first operand by the number of columns specified by the second operand. For example, if the binary value of 6 (0110) has its bits shifted to the right by 2, the binary result is 0001; the decimal equivalent is 1. Any digits that fall off the right end of the number are discarded.

 
Example
 
var shifted = 6 >> 2;

Powered by Linode.