Javascript Reference
Categories: Operators

javascript Operators <<

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

  

The bitwise left-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 3 (0011) has its bits shifted to the left by 2, the binary result is 1100; the decimal equivalent is 12.

 
Example
 
var shifted = 3 << 2;

Powered by Linode.