What does (number & number)
mean? I am trying to read someone's code written in JavaScript and came over with
if(misc & 0x800) {//...} //0x800 is 2048 when converted to decimal
Where var misc = 16400; //or some other number which continuously changes
So the statement is coming like if(16400 & 2048)
-do something
When I console.log()
ed those two numbers I got 0
.
How does if statement works in case of number and number?