JavaScript Bitwise Right Shift Operator

Bitwise Right Shift Operator

>> symbol is used for Bitwise Right Shift operator

bitwise Right Shift operator takes two values/variables as operands, shifts the bits of left operand in the right side direction by the number of positions given by right operand in right, and returns their result

a >> b
52 >> 3


1. right shift a by b number of bits

a = 52;
b = 3;
output = a >> b;
console.log(`${a} >> ${b} = ${output}`);