What do “>>” and “<<” mean in Javascript?

后端 未结 10 841
清酒与你
清酒与你 2020-11-29 13:39

I have a piece of Javascript code I\'m trying to understand

// read big-endian (network byte order) 32-bit float
readFloat32 = function(data, offset) {
    v         


        
10条回答
  •  时光说笑
    2020-11-29 14:06

    shift a by b bits to the left (padding with zeros)

    a << b
    

    shift a by b bits to the right (copying the sign bit)

    a >> b
    

提交回复
热议问题