r/ProgrammerHumor • • Mar 15 '22

static bool isCrazyMurderingRobot = false;

/img/2g1k34ok5kn81.jpg
4.9k Upvotes

257 comments sorted by

View all comments

Show parent comment

9

u/DaniilBSD Mar 15 '22

You made a big mistake: assignment operator returns the value of the asignment

a = (b = false);

In code above the brackets can be removed and the value of both variables is false.

1

u/ShadowLp174 Mar 15 '22

Ok, sorry messed that up