DEV Community

Discussion on: Explain bitwise operator Like I'm Five

Collapse
 
lexlohr profile image
Alex Lohr

While this may not be the case in every language, at least JavaScript got you covered:

Shift operators convert their operands to 32-bit integers in big-endian order and return a result of the same type as the left operand. The right operand should be less than 32, but if not only the low five bits will be used (see developer.mozilla.org/en-US/docs/W...).