What is this operator: &=

前端 未结 6 868
暖寄归人
暖寄归人 2021-01-21 16:16

Can someone explain what is the operator &= for?

I searched, but I got only results with & or =.

6条回答
  •  心在旅途
    2021-01-21 16:53

    This

    x &= y;
    

    is equivalent to

    x = x & y;
    

    Note that & is the bitwise and operator.

提交回复
热议问题