One time I was struggling to understand why a code branch I wrote was being unexpectedly taken, and I found that I had written something like if pet == 'cat' || 'dog'. Since 'dog' was a string, the condition was always true. I laughed out loud at myself.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies: