JavaScript Bitwise Left Shift Operator

Bitwise Left Shift Operator

<< symbol is used for Bitwise Left Shift operator

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

a << b
6 << 3


1. left shift a by b number of bits

a = 6;
b = 3;
output = a << b;
console.log(`${a} << ${b} = ${output}`);