if(src.key in admin || src.key in head_moderator || src.key in moderator)
So, I've been wondering for a while now. I am in "admin" and it doesn't represent this if statement as true. Why? What am I doing wrong?
Exactly how does the || and | operators work? I never bothered to get deep in to them. I just used them in simple if statements. Every now and then I pull a miracle and they do what I want them to do.
Like all operators, || takes a number of inputs (2, a left and right) and returns an output (the first value from left to right that passes as true).
The | operator deals with bits, or binary numbers. When you're dealing with just TRUE and FALSE (which is what the "in" operator returns), it's pretty much equivalent to the || operator, but it doesn't work for non-numbers.