Possible Duplicate:
What do these operators do?
What is this expression in Java ( 1 << 2)?
What does >> and << operators in JavaScript do?
I've never seen them before and im breaking my head trying to understand them.
Any help is appreciated :D
Possible Duplicate:
What do these operators do?
What is this expression in Java ( 1 << 2)?
What does >> and << operators in JavaScript do?
I've never seen them before and im breaking my head trying to understand them.
Any help is appreciated :D
They are bitwise shift operators.
In practice they are used to shift bits of variables by the specified amount, eg
2 << 2 = 8
They are standard bitwise shift operators. You need to draw 1 and 0s on paper to understand it better:
https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Expressions_and_Operators