> The function of this symbol is to shift all the bits of an integer to the right by the specified number of bits. Extra bits beyond the right boundary will " />
Extended data:
In js, left shift is logical/arithmetic left shift (both are exactly the same), and right shift is arithmetic right shift, which will keep the sign bit unchanged. In practical application, we can use left/right shift to do fast multiplication/Divison according to the situation, which is much more efficient than loop.
When shifting, all the shifted digits are discarded, and the number of shifting vacancies is related to the left or right shift. If it is left shift, it is stipulated that all the added numbers are 0; If it is shifted to the right, it is also related to whether the shifted data has a sign. If there are unsigned numbers, all the added numbers are 0; If it is a signed number, all the added numbers are equal to the original number of the leftmost bit of the original number (that is, the original sign bit).
Baidu encyclopedia-> >;
Baidu Encyclopedia-Right Shift Operator