DEV Community

Discussion on: Using Bitwise Operators

Collapse
 
arnoutboks profile image
Arnout Boks • Edited

Nice introduction to boolean logic. I couldn't help but notice that there is a small error in the code for OR though. The

if arr[0] == '1' && arr[1] == '1'
  output += '0'

should probably be

if arr[0] == '0' && arr[1] == '0'
  output += '0'
Collapse
 
logan profile image
Logan McDonald

Absolutely! Thanks for pointing it out. Also, thank you for taking the time to read!