JavaScript中的双倍符号 [英] Double more-than symbol in JavaScript
本文介绍了JavaScript中的双倍符号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是什么意思:>>在JavaScript中意味着什么?
What does this: >> mean in JavaScript?
在此上下文中看到:
document.onkeydown = document.onkeyup = function(e,v,y,k) {
(i=e.keyCode-37)>>2 || (keys[i] = e.type[5]&&1||(0))
}
推荐答案
左移a<< b将二进制
表示b(< 32)位移到左边的
,从
右移零。
Left shift a << b Shifts a in binary representation b (< 32) bits to the left, shifting in zeros from the right.
符号传播右移a >>
b向左移位二进制表示b
(< 32)位向右移动,丢弃
位移位。
Sign-propagating right shift a >> b Shifts a in binary representation b (< 32) bits to the right, discarding bits shifted off.
这篇关于JavaScript中的双倍符号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文