Nice introduction to boolean logic. I couldn't help but notice that there is a small error in the code for OR though. The
OR
if arr[0] == '1' && arr[1] == '1' output += '0'
should probably be
if arr[0] == '0' && arr[1] == '0' output += '0'
Absolutely! Thanks for pointing it out. Also, thank you for taking the time to read!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Nice introduction to boolean logic. I couldn't help but notice that there is a small error in the code for
OR
though. Theshould probably be
Absolutely! Thanks for pointing it out. Also, thank you for taking the time to read!