You are doing bitwise-or
operation and asigning the result to a.
Example:
if a=5 and b=4 then corresponding bits of their binary representation is operated by an or-operation
.
a=101
b=100
a=a|b=101|101=101=5;
2
solved What does this mean in Javascript: a = a | b [duplicate]