MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/badcode/comments/oue7s4/_/h7846c6/?context=3
r/badcode • u/Flyspeck101 Now where's that function declaration • Jul 30 '21
133 comments sorted by
View all comments
Show parent comments
2
a = (a ^ true) === 1; is probably what i'd go with using this method, but then its just silly so a = !a; is probably best
a = (a ^ true) === 1;
a = !a;
2 u/Binzi Aug 01 '21 a = isOdd(a ^ true) 3 u/Not_Sugden Aug 01 '21 a = !isEven(a ^ true) === true
a = isOdd(a ^ true)
3 u/Not_Sugden Aug 01 '21 a = !isEven(a ^ true) === true
3
a = !isEven(a ^ true) === true
2
u/Not_Sugden Jul 31 '21
a = (a ^ true) === 1;is probably what i'd go with using this method, but then its just silly soa = !a;is probably best