>>>
的含义是什么?在 JavaScript 中?它就像类型转换,或者什么,什么时候建议使用?
当我读 this article 时,我遇到了那个符号( >>>
)我有点困惑。
抱歉,如果我的问题很愚蠢,但我无法通过 Google 搜索或其他方式找到任何答案。
最佳答案
>>>
是一个按位运算符。
>>> (Zero-fill right shift) This operator shifts the first operand the specified number of bits to the right. Excess bits shifted off to the right are discarded. Zero bits are shifted in from the left. The sign bit becomes 0, so the result is always non-negative.
For non-negative numbers, zero-fill right shift and sign-propagating right shift yield the same result. For example, 9 >>> 2 yields 2, the same as 9 >> 2
来自:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators
关于javascript - `>>>` 在 JavaScript 中意味着什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46277823/