I am unable to understand a small code piece of JavaScript. Please help me to know the meaning of the following JavaScript blocks:
x = 2 + a / 30 >> 0;
What is the meaning of ">>" in JavaScript?
D = !0;
What is the value of D?
I am unable to understand a small code piece of JavaScript. Please help me to know the meaning of the following JavaScript blocks:
x = 2 + a / 30 >> 0;
What is the meaning of ">>" in JavaScript?
D = !0;
What is the value of D?
Not only JavaScript it is Shift operator generic to almost all programming languages..
Here
is a link:
Example: 5 << 1 becomes 10..
(0101)b becomes (1010)b .. ie, 10 in decimal system