MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/teqb37/static_bool_iscrazymurderingrobot_false/i0s7zbo/
r/ProgrammerHumor • u/speckz • Mar 15 '22
257 comments sorted by
View all comments
Show parent comment
1
Isn't it meant to return the value that was assigned to the variable to the if condition? Which, in the comic's case, will still be true
true
Example:
if (c = a == b) { /* c will be equal to true */ } else { /* c will be equal to false */ }
2 u/ShadowLp174 Mar 15 '22 Messed that up, sorry, it's late XD 2 u/James-Livesey Mar 15 '22 Fair, can be pretty confusing syntax sometimes anyway lol
2
Messed that up, sorry, it's late XD
2 u/James-Livesey Mar 15 '22 Fair, can be pretty confusing syntax sometimes anyway lol
Fair, can be pretty confusing syntax sometimes anyway lol
View all comments
Show parent comment
1
u/James-Livesey Mar 15 '22
Isn't it meant to return the value that was assigned to the variable to the if condition? Which, in the comic's case, will still be
trueExample: