var a = 0;
var c = 3;
function myFunction(b) {
    a = a | b;
    return (a == c);
}
Saw this today, what does "a = a | b" do?
var a = 0;
var c = 3;
function myFunction(b) {
    a = a | b;
    return (a == c);
}
Saw this today, what does "a = a | b" do?
 
    
    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;
