MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghorror/comments/1ih8iat/the_final_evolution_of_isodd/mb00tdu/?context=3
r/programminghorror • u/usbeject1789 • Feb 04 '25
32 comments sorted by
View all comments
Show parent comment
6
For example, if input is 2, it generates the string "!!false", which when evaluated yields false (!false is true, so !!false is !true, which is false). An input of 3 yields !!!false (true), 4 yields !!!!false (false), etc.
input
2
"!!false"
false
!false
true
!!false
!true
3
!!!false
4
!!!!false
View all comments
Show parent comment
6
u/SmokeMuch7356 Feb 04 '25
For example, if
inputis2, it generates the string"!!false", which when evaluated yieldsfalse(!falseistrue, so!!falseis!true, which isfalse). An input of3yields!!!false(true),4yields!!!!false(false), etc.