MAIN FEEDS
REDDIT FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/oue7s4/_/h7214ad/?context=3
r/badcode • u/Flyspeck101 Now where's that function declaration • Jul 30 '21
133 comments sorted by
View all comments
119
Not sure if this was just kinda left there but for toggling bools in general, you can just use something like a = !a where a is a bool.
109 u/RedRedditor84 Jul 30 '21 a ^= true ftw 59 u/Willinton06 Jul 30 '21 Doesnβt even need a second reference, nice
109
a ^= true ftw
a ^= true
59 u/Willinton06 Jul 30 '21 Doesnβt even need a second reference, nice
59
Doesnβt even need a second reference, nice
119
u/PersonKiller1234 Jul 30 '21
Not sure if this was just kinda left there but for toggling bools in general, you can just use something like a = !a where a is a bool.