Possible bugs? foo Bitwise OR:"|" 0 returns foo.

Maybe you meant Logical OR: "||" which would do foo Logical OR: "||" 0 meaning if foo is falsy it is 0.