There is use of the "<<" in some code I am reading and I haven't been able to find any documentation on what exactly it does. I assume it is some bit wise function of some sort.
console.log(4<<3);
//This prints out 32.
Any ideas?
There is use of the "<<" in some code I am reading and I haven't been able to find any documentation on what exactly it does. I assume it is some bit wise function of some sort.
console.log(4<<3);
//This prints out 32.
Any ideas?
From the Mozilla docs:
Left shift
a << b
Shifts
a
in binary representationb
(< 32
) bits to the left, shifting in zeros from the right.